Comparing version 2.0.1 to 2.0.2
@@ -27,3 +27,6 @@ const vm = require("vm"); | ||
content = arguments[0]; | ||
return wrap.apply(this, arguments); | ||
const result = wrap.apply(this, arguments); | ||
// restore orignal wrap function | ||
Module.wrap = wrap; | ||
return result; | ||
} | ||
@@ -34,5 +37,2 @@ | ||
// restore orignal wrap function | ||
Module.wrap = wrap; | ||
// add content to local cache. | ||
@@ -39,0 +39,0 @@ cache[file] = content; |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"main": "./lib/index.js", | ||
@@ -14,0 +14,0 @@ "dependencies": { |
@@ -91,2 +91,8 @@ var path = require("path"); | ||
it('should support modules with more than one require', function() { | ||
var mockuire = require("../lib/index")(module); | ||
var baz = mockuire("./fixture/baz"); | ||
assert.equal(baz.ping(), 'pong'); | ||
}); | ||
describe('private members', function() { | ||
@@ -93,0 +99,0 @@ var mockuire = require("../lib/index")(module); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17613
11
347