Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « lib - github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8f57ca545c2810d42782173fd74d99eeb8d9a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
};