-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
refactor test/sequential/test-fs-watch.js #14534
Conversation
@nodejs/testing |
test/sequential/test-fs-watch.js
Outdated
}); | ||
{ | ||
fs.watch(__filename, { persistent: false }, function() { | ||
assert(0); |
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.
While you're here, can we have something nicer than assert(0)
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.
Switched to common.mustNotCall()
. Thanks.
* add block scoping * rename block-scoped identifiers (e.g., filenameTwo -> filename) * use common.mustCall() instead of exit handler * use common.mustNotCall() as appropriate * order modules per test writing guide
Landed in 8c2cac6 |
* add block scoping * rename block-scoped identifiers (e.g., filenameTwo -> filename) * use common.mustCall() instead of exit handler * use common.mustNotCall() as appropriate * order modules per test writing guide PR-URL: nodejs#14534 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This doesn’t land cleanly on 8.x; if you can, please follow the guide and raise a backport PR, if you don’t think it’s worth it just add the |
* add block scoping * rename block-scoped identifiers (e.g., filenameTwo -> filename) * use common.mustCall() instead of exit handler * use common.mustNotCall() as appropriate * order modules per test writing guide PR-URL: nodejs#14534 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
I think this (and I'd guess a lot of other things) will land cleanly if #14162 is backported first. Still, I want this to land so I'm going to go backport it right now... |
Backported in #14575 |
* add block scoping * rename block-scoped identifiers (e.g., filenameTwo -> filename) * use common.mustCall() instead of exit handler * use common.mustNotCall() as appropriate * order modules per test writing guide Backport-PR-URL: #14575 Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net> PR-URL: #14534 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This does not land cleanly in LTS. Please feel free to manually backport by following the guide. Please also feel free to replace do-not-land if it is being backported |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test fs