-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
test: ignore unrelated events in FS watch tests #55605
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
Conversation
change assertions on test-fs-watch-recursive-add-* tests to only take into account change events that match the file
|
cc @pmarchini |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55605 +/- ##
==========================================
- Coverage 88.43% 87.94% -0.50%
==========================================
Files 654 654
Lines 187699 187751 +52
Branches 36125 35833 -292
==========================================
- Hits 165995 165110 -885
- Misses 14948 15829 +881
- Partials 6756 6812 +56 |
test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js
Outdated
Show resolved
Hide resolved
pmarchini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @Ceres6 🚀
Since we're already working on this part, I’d follow @lpinca's suggestion and remove
node/test/parallel/test-fs-watch-recursive-add-file-to-new-folder.js
Lines 54 to 60 in 38f4ed7
| if (common.isMacOS) { | |
| // On macOS delay watcher start to avoid leaking previous events. | |
| // Refs: https://github.com/libuv/libuv/pull/4503 | |
| setTimeout(doWatch, common.platformTimeout(100)); | |
| } else { | |
| doWatch(); | |
| } |
I'd also review the other timeouts in the tests modified by this PR, as they might have been added to address this issue 🚀
Co-authored-by: Luigi Pinca <[email protected]>
|
Landed in 42f4659 |
change assertions on test-fs-watch-recursive-add-* tests to only take into account change events that match the file
Fixes #55592