@@ -135,7 +135,7 @@ function createTestFileList() {
135135 for ( let i = 0 ; i < testPaths . length ; i ++ ) {
136136 const absolutePath = resolve ( testPaths [ i ] ) ;
137137
138- processPath ( absolutePath , testFiles , { userSupplied : true } ) ;
138+ processPath ( absolutePath , testFiles , { __proto__ : null , userSupplied : true } ) ;
139139 }
140140 } catch ( err ) {
141141 if ( err ?. code === 'ENOENT' ) {
@@ -348,9 +348,9 @@ class FileTest extends Test {
348348function runTestFile ( path , root , inspectPort , filesWatcher , testNamePatterns ) {
349349 const watchMode = filesWatcher != null ;
350350 const subtest = root . createSubtest ( FileTest , path , async ( t ) => {
351- const args = getRunArgs ( { path, inspectPort, testNamePatterns } ) ;
351+ const args = getRunArgs ( { __proto__ : null , path, inspectPort, testNamePatterns } ) ;
352352 const stdio = [ 'pipe' , 'pipe' , 'pipe' ] ;
353- const env = { ...process . env , NODE_TEST_CONTEXT : 'child-v8' } ;
353+ const env = { __proto__ : null , ...process . env , NODE_TEST_CONTEXT : 'child-v8' } ;
354354 if ( watchMode ) {
355355 stdio . push ( 'ipc' ) ;
356356 env . WATCH_REPORT_DEPENDENCIES = '1' ;
@@ -359,7 +359,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
359359 env . FORCE_COLOR = '1' ;
360360 }
361361
362- const child = spawn ( process . execPath , args , { signal : t . signal , encoding : 'utf8' , env, stdio } ) ;
362+ const child = spawn ( process . execPath , args , { __proto__ : null , signal : t . signal , encoding : 'utf8' , env, stdio } ) ;
363363 if ( watchMode ) {
364364 filesWatcher . runningProcesses . set ( path , child ) ;
365365 filesWatcher . watcher . watchChildProcessModules ( child , path ) ;
@@ -376,7 +376,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
376376 subtest . parseMessage ( data ) ;
377377 } ) ;
378378
379- const rl = createInterface ( { input : child . stderr } ) ;
379+ const rl = createInterface ( { __proto__ : null , input : child . stderr } ) ;
380380 rl . on ( 'line' , ( line ) => {
381381 if ( isInspectorMessage ( line ) ) {
382382 process . stderr . write ( line + '\n' ) ;
@@ -394,8 +394,8 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
394394 } ) ;
395395
396396 const { 0 : { 0 : code , 1 : signal } } = await SafePromiseAll ( [
397- once ( child , 'exit' , { signal : t . signal } ) ,
398- finished ( child . stdout , { signal : t . signal } ) ,
397+ once ( child , 'exit' , { __proto__ : null , signal : t . signal } ) ,
398+ finished ( child . stdout , { __proto__ : null , signal : t . signal } ) ,
399399 ] ) ;
400400
401401 if ( watchMode ) {
@@ -428,7 +428,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
428428function watchFiles ( testFiles , root , inspectPort , signal , testNamePatterns ) {
429429 const runningProcesses = new SafeMap ( ) ;
430430 const runningSubtests = new SafeMap ( ) ;
431- const watcher = new FilesWatcher ( { debounce : 200 , mode : 'filter' , signal } ) ;
431+ const watcher = new FilesWatcher ( { __proto__ : null , debounce : 200 , mode : 'filter' , signal } ) ;
432432 const filesWatcher = { __proto__ : null , watcher, runningProcesses, runningSubtests } ;
433433
434434 watcher . on ( 'changed' , ( { owners } ) => {
@@ -513,7 +513,7 @@ function run(options) {
513513 } ) ;
514514 }
515515
516- const root = createTestTree ( { concurrency, timeout, signal } ) ;
516+ const root = createTestTree ( { __proto__ : null , concurrency, timeout, signal } ) ;
517517 let testFiles = files ?? createTestFileList ( ) ;
518518
519519 if ( shard ) {
0 commit comments