felixge / felixge/node-sandboxed-module
Mocking module scoped variables
Open
- Dominant language
- JavaScript
- Stars
- 343
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
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.
```js
var hello = 'Hello Sir'
console.log(hello)
```
https://stackoverflow.com/questions/49478755/require-and-overwrite-module-scoped-variable-for-testing
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.