Skip to content

test: fix watch tests not including completion messages #58183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/sequential/test-watch-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -810,14 +810,14 @@ process.on('message', (message) => {
assert.strictEqual(stderr, '');
assert.deepStrictEqual(stdout, [
'no --watch args present',
`Completed running ${inspect(file)}`,
`Completed running ${inspect(file)}. Waiting for file changes before restarting...`,
`Restarting ${inspect(file)}`,
'no --watch args present',
`Completed running ${inspect(file)}`,
`Completed running ${inspect(file)}. Waiting for file changes before restarting...`,
]);
});

it('`--watch-path` ars without `=` used alongside `--watch` should not make it into the script', async () => {
it('`--watch-path` args without `=` used alongside `--watch` should not make it into the script', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated typo fix 🙂

const projectDir = tmpdir.resolve('project-watch-watch-path-args');
mkdirSync(projectDir);

Expand All @@ -835,10 +835,10 @@ process.on('message', (message) => {
assert.strictEqual(stderr, '');
assert.deepStrictEqual(stdout, [
'no cli arg ends with .js',
`Completed running ${inspect(file)}`,
`Completed running ${inspect(file)}. Waiting for file changes before restarting...`,
`Restarting ${inspect(file)}`,
'no cli arg ends with .js',
`Completed running ${inspect(file)}`,
`Completed running ${inspect(file)}. Waiting for file changes before restarting...`,
]);
});
});
Loading