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 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
79var rewire ;
810
911describe ( "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 } ) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments