Skip to content
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

test_runner: added restart log in test-runner/runner.js #57375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sivakumar-77
Copy link

@sivakumar-77 sivakumar-77 commented Mar 8, 2025

Fixes #57206

Added restart log in test-runner/runner.js to log with timestamp and test-file
whenever the test file is restart testing in --watch mode.

Fixes nodejs#57206

Added restart log in test-runner/runner.js to log with timestamp and test-file, whenever the test file is restart testing in `--watch` mode.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Mar 8, 2025
@sivakumar-77 sivakumar-77 changed the title add: restart log in test-runner/runner.js lib: added restart log in test-runner/runner.js Mar 8, 2025
@pmarchini
Copy link
Member

Hey @sivakumar-77, thanks for opening this PR! 🚀

I think we should avoid adding process.stdout.write directly inside the runner restart logic.

I would suggest adding a new event, like the existing one, test:watch:drained, to allow users to customise the behaviour while avoiding unwanted output in existing custom reporters.
I would then suggest handling the new event in the internal reporters (spec, tap, etc.).

Could you also please add tests to cover this feature?

@pmarchini pmarchini changed the title lib: added restart log in test-runner/runner.js test_runner: added restart log in test-runner/runner.js Mar 8, 2025
@sivakumar-77
Copy link
Author

Hey @pmarchini thanks for the feedback! 🙌

That makes sense—I’ll update the PR to introduce a new event instead of directly modifying the runner restart logic. I’ll also update the internal reporters to handle it appropriately.

I'll add tests to cover this feature as well. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test-runner: write out timestamp as first line in watch mode
3 participants