DEV Community

Discussion on: Mocking ES6 class methods with Jest!

Collapse
 
jackcaldwell profile image
Jack Caldwell

I'm not quite sure what you mean. In this example the 'ProductsManager' is the class being tested. The 'ProductsClient' is being mocked so we make assumptions about its behaviour in order to test the 'ProductsManager' in isolation. It's assumed that the 'ProductsClient' would be tested separately.