test(integration): stabilize watch helper using run-completion sync#5879
Open
mostafaNazari702 wants to merge 1 commit intomochajs:mainfrom
Open
test(integration): stabilize watch helper using run-completion sync#5879mostafaNazari702 wants to merge 1 commit intomochajs:mainfrom
mostafaNazari702 wants to merge 1 commit intomochajs:mainfrom
Conversation
Contributor
Author
|
Wrong branch. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5879 +/- ##
=======================================
Coverage 89.71% 89.71%
=======================================
Files 64 64
Lines 4695 4695
Branches 978 978
=======================================
Hits 4212 4212
Misses 483 483 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I was actually right, thought that i pushed code to the previous active PR that i have. Sorry. |
…ad of fixed startup sleeps
8bb403d to
f755981
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
status: accepting prsOverview
This stabilizes
test/integration/options/watch.spec.jsby removing the brittle startup timing assumption inrunMochaWatchAsync.Before this change, helper timing was based on fixed sleeps (
sleepMs) before and after the file change callback. That could miss real watch lifecycle timing on slower/contended CI environments, especially for watch paths outside the current working directory.What changed:
runMochaWatchAsyncnow synchronizes using real watch-run completion markers from subprocess output instead of relying on fixed startup waits.SIGINT.Why this approach:
Validation run:
npm run test-node:integration:watch→30 passing--parallel --timeout 10000 --slow 3750, grep:outside the current working directory) passed consistently, including under CPU load.