DEV Community

Discussion on: Don't Mock What You Don't Own

Collapse
 
alysivji profile image
Aly Sivji

You make an interesting point. I get why wrapper libraries help, but how do you test that library?

What kind of integration tests do you use? How do you test the wrapper's interface with the third party library? Stubs?

Collapse
 
satansdeer profile image
Maksim Ivanov

You should test the wrapper in integration with the actual library. Using Stubs would violate exactly that principle.

There is a great talk where the guy partially covers the topic of wrapping external libs: vimeo.com/80533536