diff --git a/test/parallel/test-child-process-exec-abortcontroller-promisified.js b/test/parallel/test-child-process-exec-abortcontroller-promisified.js index b818a00a2921d6..ac77d39938d8b6 100644 --- a/test/parallel/test-child-process-exec-abortcontroller-promisified.js +++ b/test/parallel/test-child-process-exec-abortcontroller-promisified.js @@ -10,12 +10,9 @@ const invalidArgTypeError = { name: 'TypeError' }; -let waitCommand = ''; -if (common.isWindows) { - waitCommand = 'TIMEOUT 120'; -} else { - waitCommand = 'sleep 2m'; -} +const waitCommand = common.isLinux ? + 'sleep 2m' : + `${process.execPath} -e "setInterval(()=>{}, 99)"`; { const ac = new AbortController();