felixge / felixge/node-sandboxed-module
Mocking module scoped variables
Aperta
- Lingua principale
- JavaScript
- Stelle
- 343
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.