diff options
author | Johannes <mail@johannesewald.de> | 2012-06-03 22:18:41 +0400 |
---|---|---|
committer | Johannes <mail@johannesewald.de> | 2012-06-03 22:18:41 +0400 |
commit | 07496ad0283cf5cc2184ecdf57b7d80cdc8348eb (patch) | |
tree | da64eb0ef4a03b30720fcb10edabb851912d618c /lib/index.js | |
parent | fb06490b1b810777ebf8f35cdc83875ccda893e8 (diff) |
all tests up and running
Diffstat (limited to 'lib/index.js')
-rw-r--r-- | lib/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..f8f57ca --- /dev/null +++ b/lib/index.js @@ -0,0 +1,13 @@ +"use strict"; // run code in ES5 strict mode
+
+var trick = require("./trick.js");
+
+module.exports = function (request, mocks, injections, leaks, 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 trick(module.parent, request, mocks, injections, leaks, cache);
+};
\ No newline at end of file |