-
Notifications
You must be signed in to change notification settings - Fork 30k
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: a small common.skip() improvement proposal #14016
Comments
I think some test files are using it to partially skip tests, and let it print a skip message in the format that TAP understands; I’m not sure on the details, but you’d probably need to check the relevant files to see where there is actual code executed after the |
An example is test/parallel/test-buffer-alloc.js. (I'm actually not sure that isn't a code mistake TBH. I'm not sure TAP understands "partial skip". I think with TAP you either SKIP the test or you don't.) |
It seems we have ~10 tests with partial skip now if I skim properly. So would it be OK to just add a message via |
@vsemozhetbyt Either that, or you could just rename the current |
@addaleax @Trott parallel/test-dgram-bind-default-address.js I've left them with PR: #14021 |
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: #14021 Fixes: #14016 Reviewed-By: Refael Ackermann <[email protected]>
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: #14021 Fixes: #14016 Reviewed-By: Refael Ackermann <[email protected]>
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: #14021 Fixes: #14016 Reviewed-By: Refael Ackermann <[email protected]>
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip Backport-PR-URL: #14838 PR-URL: #14021 Fixes: #14016 Reviewed-By: Refael Ackermann <[email protected]>
* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip Backport-PR-URL: #14838 PR-URL: #14021 Fixes: #14016 Reviewed-By: Refael Ackermann <[email protected]>
Currently,
common.skip()
only outputs a message, so after each call, we need to addreturn;
in tests — this is +~400 lines of code. Would it be safe to make this function likecommon.skipIfInspectorDisabled()
, i.e. to addprocess.exit(0);
incommon.skip()
and remove all thereturn;
in tests? If there are some +1 for this proposal, I can try to raise a PR.The text was updated successfully, but these errors were encountered: