@@ -16,7 +16,7 @@ if (!process.env.HAS_STARTED_WORKER) {
1616 // Normalize the current working dir to also work with the root folder.
1717 process . chdir ( __dirname ) ;
1818
19- assert ( ! process . cwd . toString ( ) . includes ( 'Atomics.load' ) ) ;
19+ assert . doesNotMatch ( process . cwd . toString ( ) , / A t o m i c s L o a d / ) ;
2020
2121 // 1. Start the first worker.
2222 const w = new Worker ( __filename ) ;
@@ -32,7 +32,7 @@ if (!process.env.HAS_STARTED_WORKER) {
3232 // 2. Save the current cwd and verify that `process.cwd` includes the
3333 // Atomics.load call and spawn a new worker.
3434 const cwd = process . cwd ( ) ;
35- assert ( process . cwd . toString ( ) . includes ( 'Atomics.load' ) ) ;
35+ assert . match ( process . cwd . toString ( ) , / A t o m i c s L o a d / ) ;
3636
3737 const w = new Worker ( __filename ) ;
3838 w . once ( 'message' , common . mustCall ( ( message ) => {
@@ -56,7 +56,7 @@ if (!process.env.HAS_STARTED_WORKER) {
5656 const cwd = process . cwd ( ) ;
5757 // Send the current cwd to the parent.
5858 parentPort . postMessage ( cwd ) ;
59- assert ( process . cwd . toString ( ) . includes ( 'Atomics.load' ) ) ;
59+ assert . match ( process . cwd . toString ( ) , / A t o m i c s L o a d / ) ;
6060
6161 parentPort . once ( 'message' , common . mustCall ( ( message ) => {
6262 // 7. Verify that the current cwd is identical to the received one but
0 commit comments