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?
As I mentioned with
proxyquire
it is not possible to access private variables on module level. It is only possible withrewire
.Conversely,
rewire
cannot stubrequire
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?