Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70d27af

Browse files
committed
- Rolled back fake-package.json-mechanism
1 parent 243e1c5 commit 70d27af

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/rewire.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
// In case this module was in strict mode, all other modules called by this would also be strict.
33
// But when testing if the strict mode is preserved, we must ensure that this module is NOT strict.
44

5-
var expect = require("expect.js");
5+
var expect = require("expect.js"),
6+
fs = require("fs"),
7+
path = require("path");
68

79
var rewire;
810

911
describe("rewire", function () {
12+
before(function () {
13+
var fakeNodeModules = path.resolve(__dirname, "testModules/fake_node_modules");
14+
15+
if (fs.existsSync(fakeNodeModules)) {
16+
fs.renameSync(fakeNodeModules, path.resolve(__dirname, "testModules/node_modules"));
17+
}
18+
});
1019
it("should pass all shared test cases", function () {
1120
require("./testModules/sharedTestCases.js");
1221
});

0 commit comments

Comments
 (0)