@@ -94,7 +94,7 @@ test.suite(
94
94
}
95
95
) ;
96
96
97
- const declareGlobals = `declare var replReport: any, stdinReport: any, evalReport: any, restReport: any, global: any, __filename: any, __dirname: any, module: any, exports: any, fs: any ;` ;
97
+ const declareGlobals = `declare var replReport: any, stdinReport: any, evalReport: any, restReport: any, global: any, __filename: any, __dirname: any, module: any, exports: any;` ;
98
98
function setReportGlobal ( type : 'repl' | 'stdin' | 'eval' ) {
99
99
return `
100
100
${ declareGlobals }
@@ -107,7 +107,7 @@ test.suite(
107
107
modulePaths: typeof module !== 'undefined' && [...module.paths],
108
108
exportsTest: typeof exports !== 'undefined' ? module.exports === exports : null,
109
109
stackTest: new Error().stack!.split('\\n')[1],
110
- moduleAccessorsTest: typeof fs === 'undefined' ? null : fs === require('fs'),
110
+ moduleAccessorsTest: eval(' typeof fs') === 'undefined' ? null : eval('fs') === require('fs'),
111
111
argv: [...process.argv]
112
112
};
113
113
` . replace ( / \n / g, '' ) ;
@@ -203,7 +203,7 @@ test.suite(
203
203
exportsTest : true ,
204
204
// Note: vanilla node uses different name. See #1360
205
205
stackTest : expect . stringContaining (
206
- ` at ${ join ( TEST_DIR , '<repl>.ts' ) } :2 :`
206
+ ` at ${ join ( TEST_DIR , '<repl>.ts' ) } :4 :`
207
207
) ,
208
208
moduleAccessorsTest : true ,
209
209
argv : [ tsNodeExe ] ,
@@ -356,7 +356,7 @@ test.suite(
356
356
exportsTest : true ,
357
357
// Note: vanilla node uses different name. See #1360
358
358
stackTest : expect . stringContaining (
359
- ` at ${ join ( TEST_DIR , '<repl>.ts' ) } :2 :`
359
+ ` at ${ join ( TEST_DIR , '<repl>.ts' ) } :4 :`
360
360
) ,
361
361
moduleAccessorsTest : true ,
362
362
argv : [ tsNodeExe ] ,
0 commit comments