@@ -134,7 +134,10 @@ function createTestFileList() {
134134 for ( let i = 0 ; i < testPaths . length ; i ++ ) {
135135 const absolutePath = resolve ( testPaths [ i ] ) ;
136136
137- processPath ( absolutePath , testFiles , { userSupplied : true } ) ;
137+ processPath ( absolutePath , testFiles , {
138+ __proto__ : null ,
139+ userSupplied : true ,
140+ } ) ;
138141 }
139142 } catch ( err ) {
140143 if ( err ?. code === 'ENOENT' ) {
@@ -347,9 +350,9 @@ class FileTest extends Test {
347350function runTestFile ( path , root , inspectPort , filesWatcher , testNamePatterns ) {
348351 const watchMode = filesWatcher != null ;
349352 const subtest = root . createSubtest ( FileTest , path , async ( t ) => {
350- const args = getRunArgs ( { path, inspectPort, testNamePatterns } ) ;
353+ const args = getRunArgs ( { __proto__ : null , path, inspectPort, testNamePatterns } ) ;
351354 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' } ;
353356 if ( watchMode ) {
354357 stdio . push ( 'ipc' ) ;
355358 env . WATCH_REPORT_DEPENDENCIES = '1' ;
@@ -358,7 +361,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
358361 env . FORCE_COLOR = '1' ;
359362 }
360363
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 } ) ;
362365 if ( watchMode ) {
363366 filesWatcher . runningProcesses . set ( path , child ) ;
364367 filesWatcher . watcher . watchChildProcessModules ( child , path ) ;
@@ -375,7 +378,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
375378 subtest . parseMessage ( data ) ;
376379 } ) ;
377380
378- const rl = createInterface ( { input : child . stderr } ) ;
381+ const rl = createInterface ( { __proto__ : null , input : child . stderr } ) ;
379382 rl . on ( 'line' , ( line ) => {
380383 if ( isInspectorMessage ( line ) ) {
381384 process . stderr . write ( line + '\n' ) ;
@@ -393,8 +396,8 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
393396 } ) ;
394397
395398 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 } ) ,
398401 ] ) ;
399402
400403 if ( watchMode ) {
@@ -427,7 +430,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
427430function watchFiles ( testFiles , root , inspectPort , signal , testNamePatterns ) {
428431 const runningProcesses = new SafeMap ( ) ;
429432 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 } ) ;
431434 const filesWatcher = { __proto__ : null , watcher, runningProcesses, runningSubtests } ;
432435
433436 watcher . on ( 'changed' , ( { owners } ) => {
@@ -512,7 +515,7 @@ function run(options) {
512515 } ) ;
513516 }
514517
515- const root = createTestTree ( { concurrency, timeout, signal } ) ;
518+ const root = createTestTree ( { __proto__ : null , concurrency, timeout, signal } ) ;
516519 let testFiles = files ?? createTestFileList ( ) ;
517520
518521 if ( shard ) {
0 commit comments