diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | node_modules/require-inject/.npmignore | 3 | ||||
-rw-r--r-- | node_modules/require-inject/index.js | 24 | ||||
-rw-r--r-- | node_modules/require-inject/package.json | 20 |
4 files changed, 1 insertions, 47 deletions
diff --git a/.gitignore b/.gitignore index 0a33b895a..44a8b75c7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ npm-debug.log /node_modules/.bin /node_modules/npm-registry-mock /node_modules/marked +/node_modules/require-inject /html/api/ /html/doc/ /man/ diff --git a/node_modules/require-inject/.npmignore b/node_modules/require-inject/.npmignore deleted file mode 100644 index 779f79d7d..000000000 --- a/node_modules/require-inject/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -DEADJOE -.#* diff --git a/node_modules/require-inject/index.js b/node_modules/require-inject/index.js deleted file mode 100644 index c8ae70751..000000000 --- a/node_modules/require-inject/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -module.exports = function (toLoad, mocks) { - // Inject all of our mocks - Object.keys(mocks).forEach(function(name){ - var path = require.resolve(name) - require.cache[path] = {exports: mocks[name]} - }) - - var toLoadPath = require.resolve(toLoad) - - // remove any unmocked version previously loaded - delete require.cache[toLoadPath] - // load our new version using our mocks - var mocked = require(toLoadPath) - // remove our version from the cache so anyone else gets the real thing - delete require.cache[toLoadPath] - - // Remove our injected mocks - Object.keys(mocks).forEach(function(name){ - delete require.cache[require.resolve(name)] - }) - return mocked -} diff --git a/node_modules/require-inject/package.json b/node_modules/require-inject/package.json deleted file mode 100644 index a0aeece82..000000000 --- a/node_modules/require-inject/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "require-inject", - "version": "1.0.0", - "description": "A simple mock injector compatible needing no instrumentation in the libraries being tested", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org" - }, - "license": "ISC", - "gitHead": "90d553a25aed490f31eb06327a0320bac13397ba", - "readme": "ERROR: No README data found!", - "_id": "require-inject@1.0.0", - "_shasum": "372345aa65858b901996ae56d7e68599a8a2f30f", - "_from": "../require-inject/" -} |