Rewiremock API is quite simply, and quite right
. But sometimes it is overpower, and you need something simpler.
Introducing the new methods:
- rewiremock.proxy(file, stubs) – proxyquire style command, but stubs can be a function(to use rewiremock mock API inside)
- rewiremock.module(fileLoader, stubs) - the same function, but you will provide a require/import function by your own.
And, last but not least - rewiremock now supporting webpack.