File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
testModules/fake_node_modules/rewire Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2
2
// In case this module was in strict mode, all other modules called by this would also be strict.
3
3
// But when testing if the strict mode is preserved, we must ensure that this module is NOT strict.
4
4
5
- var expect = require ( "expect.js" ) ;
5
+ var expect = require ( "expect.js" ) ,
6
+ fs = require ( "fs" ) ,
7
+ path = require ( "path" ) ;
6
8
7
9
var rewire ;
8
10
9
11
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
+ } ) ;
10
19
it ( "should pass all shared test cases" , function ( ) {
11
20
require ( "./testModules/sharedTestCases.js" ) ;
12
21
} ) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments