From 07496ad0283cf5cc2184ecdf57b7d80cdc8348eb Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 3 Jun 2012 20:18:41 +0200 Subject: all tests up and running --- lib/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/index.js (limited to 'lib/index.js') 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 -- cgit v1.2.3