Mocking extension functions

So this is not really about testing the extension functions themselves, but more about making it easy to test the code which uses an API implemented as extension functions. This is definitely a valid use case, and unfortunately I don’t think Kotlin has a good answer to that at this time (that’s why I only replied to the part of your question about testing the standard library).

3 Likes