Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Oct 21, 2023
1 parent 1ac5cc2 commit 44f504f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/sequential/test-watch-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,12 @@ console.log(values.random);

it('should load --require modules in the watched process, and not in the orchestrator process', async () => {
const file = createTmpFile();
const required = createTmpFile('setImmediate(() => process.exit(0));');
const required = createTmpFile('process._rawDebug(\'pid\', process.pid);');
const args = ['--require', required, file];
const { stderr, stdout } = await runWriteSucceed({ file, watchedFile: file, args });
const { stdout, pid } = await runWriteSucceed({ file, watchedFile: file, args });

assert.strictEqual(stderr, '');
const importPid = parseInt(stdout[0].split(' ')[1], 10);
assert.notStrictEqual(pid, importPid);
assert.deepStrictEqual(stdout, [
'running',
`Completed running ${inspect(file)}`,
Expand Down

0 comments on commit 44f504f

Please sign in to comment.