felixge / felixge/node-sandboxed-module
Mocking module scoped variables
Đang mở
- Ngôn ngữ chính
- JavaScript
- Star
- 343
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.