diff --git a/test/parallel/test-worker-process-cwd.js b/test/parallel/test-worker-process-cwd.js index 81c6edac3e4501..e281610a49d1d0 100644 --- a/test/parallel/test-worker-process-cwd.js +++ b/test/parallel/test-worker-process-cwd.js @@ -10,6 +10,7 @@ if (!process.env.HAS_STARTED_WORKER) { if (!isMainThread) { common.skip('This test can only run as main thread'); } + process.chdir(__dirname); const w = new Worker(__filename); process.chdir('..'); w.on('message', common.mustCall((message) => {