We currently use IIFEs but I am trying to move to ES6 modules. The problem I am running into is for testing, how do you mock/spy/stub a module that the module under test is importing? We use Jasmine with Karma. I've tried a couple of babel plugins to rewire the modules to allow spying/stubbing but I'm wondering what other people are using? Thanks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We currently use IIFEs but I am trying to move to ES6 modules. The problem I am running into is for testing, how do you mock/spy/stub a module that the module under test is importing? We use Jasmine with Karma. I've tried a couple of babel plugins to rewire the modules to allow spying/stubbing but I'm wondering what other people are using? Thanks!