diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -179,15 +179,10 @@ Please be aware that you can't rewire `eval()` or the global object itself. API --- -### rewire(filename: String, [options]): rewiredModule +### rewire(filename: String): rewiredModule Returns a rewired version of the module found at `filename`. Use `rewire()` exactly like `require()`. -#### Options -| Property | Default | Description | -|----------|---------|-------------| -| convertConst | false | Set to true to convert all `const` variables of the required module to `let`. This way you can mock const variables. **Caution**: Setting this to true can lead to inaccurate tests. - ### rewiredModule.__set__(name: String, value: *): Function Sets the internal variable `name` to the given `value`. Returns a function which can be called to revert the change. |