DEV Community

Discussion on: How to mock function that called inside module

Collapse
 
jackmellis profile image
Jack

Solution 3 is to use a dependency injection or composition pattern to give you more control over your dependencies ๐Ÿ‘€

Collapse
 
edwinwong90 profile image
Edwin Wong

Yeah~ true.