Open hellboy81 opened 8 years ago
Apologies for the tardy reply. This is a fork I used to patch a bug, but it never got merged. I've since moved to Proxyquire which I accidentally found was much faster. See my SO question: http://stackoverflow.com/questions/24190043/proxyquire-rewire-sandboxedmodule-and-sinon-pros-cons In your case, just setting proxess.env.NODE_ENV before/after may be sufficient.
SandBoxedModule
to stubNODE_ENV
global variable?process.env.NODE_ENV
temporarily inbeforeEach
and restore it inafterEach
.