rewire
rewire copied to clipboard
simultaneous usage of rewire and proxyquire
As I mentioned with proxyquire
it is not possible to access private variables on module level. It is only possible with rewire
.
Conversely, rewire
cannot stub require
itself. I.e. all modules are loaded, although they should be stubbed and are not required installed for unit tests.
Is there possible to use both of this libraries simultaneously?
We use both libraries by using rewire-global for node, and rewireify for the browser.
I'm thinking about providing an option to specify the dependencies because this feature has been requested very often. #73