diff options
author | Johannes <mail@johannesewald.de> | 2012-06-12 01:29:10 +0400 |
---|---|---|
committer | Johannes <mail@johannesewald.de> | 2012-06-12 01:29:10 +0400 |
commit | 0af1dcb6b2ccbc7ec0ae757549688e666cf569a7 (patch) | |
tree | 4b3854b937ff1f05bf8677c8fc1547fa733e6feb /lib/index.js | |
parent | 75f6a7765a09344dab54a4a2ca99ac12f547a75d (diff) |
- changed APIv0.2.0
- introduced __set__ and __get__ to rewired modules
Diffstat (limited to 'lib/index.js')
-rw-r--r-- | lib/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/index.js b/lib/index.js index 8be8897..a6dbcd6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -13,14 +13,14 @@ var rewireModule = require("./rewire.js"); * @param {Boolean} cache Indicates whether the rewired module should be cached by node so subsequent calls of require() will return the rewired module. Subsequent calls of rewire() will always overwrite the cache.
* @return {*} the rewired module
*/
-function rewire(request, mocks, injections, leaks, cache) {
+function rewire(request, cache) {
delete require.cache[__filename]; // deleting self from module cache so the parent module is always up to date
if (cache === undefined) {
cache = true;
}
- return rewireModule(module.parent, request, mocks, injections, leaks, cache);
+ return rewireModule(module.parent, request, cache);
}
rewire.reset = rewireModule.reset;
|