@@ -134,7 +134,10 @@ function createTestFileList() {
134
134
for ( let i = 0 ; i < testPaths . length ; i ++ ) {
135
135
const absolutePath = resolve ( testPaths [ i ] ) ;
136
136
137
- processPath ( absolutePath , testFiles , { userSupplied : true } ) ;
137
+ processPath ( absolutePath , testFiles , {
138
+ __proto__ : null ,
139
+ userSupplied : true ,
140
+ } ) ;
138
141
}
139
142
} catch ( err ) {
140
143
if ( err ?. code === 'ENOENT' ) {
@@ -347,9 +350,9 @@ class FileTest extends Test {
347
350
function runTestFile ( path , root , inspectPort , filesWatcher , testNamePatterns ) {
348
351
const watchMode = filesWatcher != null ;
349
352
const subtest = root . createSubtest ( FileTest , path , async ( t ) => {
350
- const args = getRunArgs ( { path, inspectPort, testNamePatterns } ) ;
353
+ const args = getRunArgs ( { __proto__ : null , path, inspectPort, testNamePatterns } ) ;
351
354
const stdio = [ 'pipe' , 'pipe' , 'pipe' ] ;
352
- const env = { ...process . env , NODE_TEST_CONTEXT : 'child-v8' } ;
355
+ const env = { __proto__ : null , ...process . env , NODE_TEST_CONTEXT : 'child-v8' } ;
353
356
if ( watchMode ) {
354
357
stdio . push ( 'ipc' ) ;
355
358
env . WATCH_REPORT_DEPENDENCIES = '1' ;
@@ -358,7 +361,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
358
361
env . FORCE_COLOR = '1' ;
359
362
}
360
363
361
- const child = spawn ( process . execPath , args , { signal : t . signal , encoding : 'utf8' , env, stdio } ) ;
364
+ const child = spawn ( process . execPath , args , { __proto__ : null , signal : t . signal , encoding : 'utf8' , env, stdio } ) ;
362
365
if ( watchMode ) {
363
366
filesWatcher . runningProcesses . set ( path , child ) ;
364
367
filesWatcher . watcher . watchChildProcessModules ( child , path ) ;
@@ -375,7 +378,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
375
378
subtest . parseMessage ( data ) ;
376
379
} ) ;
377
380
378
- const rl = createInterface ( { input : child . stderr } ) ;
381
+ const rl = createInterface ( { __proto__ : null , input : child . stderr } ) ;
379
382
rl . on ( 'line' , ( line ) => {
380
383
if ( isInspectorMessage ( line ) ) {
381
384
process . stderr . write ( line + '\n' ) ;
@@ -393,8 +396,8 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
393
396
} ) ;
394
397
395
398
const { 0 : { 0 : code , 1 : signal } } = await SafePromiseAll ( [
396
- once ( child , 'exit' , { signal : t . signal } ) ,
397
- finished ( child . stdout , { signal : t . signal } ) ,
399
+ once ( child , 'exit' , { __proto__ : null , signal : t . signal } ) ,
400
+ finished ( child . stdout , { __proto__ : null , signal : t . signal } ) ,
398
401
] ) ;
399
402
400
403
if ( watchMode ) {
@@ -427,7 +430,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
427
430
function watchFiles ( testFiles , root , inspectPort , signal , testNamePatterns ) {
428
431
const runningProcesses = new SafeMap ( ) ;
429
432
const runningSubtests = new SafeMap ( ) ;
430
- const watcher = new FilesWatcher ( { debounce : 200 , mode : 'filter' , signal } ) ;
433
+ const watcher = new FilesWatcher ( { __proto__ : null , debounce : 200 , mode : 'filter' , signal } ) ;
431
434
const filesWatcher = { __proto__ : null , watcher, runningProcesses, runningSubtests } ;
432
435
433
436
watcher . on ( 'changed' , ( { owners } ) => {
@@ -512,7 +515,7 @@ function run(options) {
512
515
} ) ;
513
516
}
514
517
515
- const root = createTestTree ( { concurrency, timeout, signal } ) ;
518
+ const root = createTestTree ( { __proto__ : null , concurrency, timeout, signal } ) ;
516
519
let testFiles = files ?? createTestFileList ( ) ;
517
520
518
521
if ( shard ) {
0 commit comments