Open reggi opened 6 years ago
Is it possible to mock a module scoped variable?
Given the following file. I'd like to change the value of hello, to something else.
hello
var hello = 'Hello Sir' console.log(hello)
https://stackoverflow.com/questions/49478755/require-and-overwrite-module-scoped-variable-for-testing
Is it possible to mock a module scoped variable?
Given the following file. I'd like to change the value of
hello
, to something else.https://stackoverflow.com/questions/49478755/require-and-overwrite-module-scoped-variable-for-testing