Skip to content

Webpack + Proxyquire API

Choose a tag to compare

@theKashey theKashey released this 02 Oct 07:44
· 240 commits to master since this release

Rewiremock API is quite simply, and quite right. But sometimes it is overpower, and you need something simpler.
Introducing the new methods:

  1. rewiremock.proxy(file, stubs) – proxyquire style command, but stubs can be a function(to use rewiremock mock API inside)
  2. 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.