robrich / node-sandboxed-module

MIT License
0 stars 0 forks source link

[discussion] [help needed] Stubbing NODE_ENV global #1

Open hellboy81 opened 8 years ago

hellboy81 commented 8 years ago
robrich commented 7 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.