Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70d27af

Browse files
committed
- Rolled back fake-package.json-mechanism
1 parent243e1c5 commit70d27af

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-
varexpect=require("expect.js");
5+
varexpect=require("expect.js"),
6+
fs=require("fs"),
7+
path=require("path");
68

79
varrewire;
810

911
describe("rewire",function(){
12+
before(function(){
13+
varfakeNodeModules=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)

[8]ページ先頭

©2009-2025 Movatter.jp