-
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
Built-in test
module only report ouput of the first top level describe
#46478
Comments
please include the file you are running and the cli command |
I have uploaded my project to https://github.com/piranna/ESDiPi, and the actual file with the tests are at https://github.com/piranna/ESDiPi/blob/main/test/cli.js, you can play with them reordering or skipping them and will have the same behaviour I have. Module itself is working properly, so tests should not give you problems, just only the Node.js |
@piranna the issue is the usage of |
Aren't they aliases between them? At least it's the feel it gives on the docs (not that it says it, it's just a feeling) and the same for |
they are not aliases, but I agree it is a fair expectation for |
Thank you :-) |
1 similar comment
Thank you :-) |
I confirm that with
I think with these tests output report they should be
Maybe that should be another issue? |
That's being handled in #46440. |
Cool, thank you for the pointer :-) |
PR-URL: nodejs#46544 Fixes: nodejs#46478 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#46544 Fixes: nodejs#46478 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#46544 Fixes: nodejs#46478 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#46544 Fixes: nodejs#46478 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#46544 Fixes: nodejs/node#46478 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> (cherry picked from commit 2787e2dfc2e10c584259ff34d7aad565447a84d9)
Version
v19.4.0
Platform
Linux AVRAST1790 5.19.0-30-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 6 15:40:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
test
What steps will reproduce the bug?
On a test file with multiple top level
describe
, report output only show the first one of them that got run. Any otherdescribe
gets no reported nor counted, both passing or failing. In fact, final report don't provide correct statistics at all:It should be showing 11 total tests, passing 4 (3 from "empty esdipi"
describe
and another top level one not shown), 6 skipped ones from the "clean-sdp" and "compress"describe
s, and 1 failed top level one not shown.If there are other skipped
describe
s, they are shown as skipped, but there's no info of any otherdescribe
ortest
defined it. In fact, if I havetest
s after that describe, they get run (checked with c8 coverage, code being tested by that tests gets covered) but their status is not reported at all, both failed or sucessful. If I move one of thattest
that's passing to be executed before thedescribe
s, lefting onetest
that's failing to execute after thedescribe
s, then the firsttest
and all thedescribe
s (including the skipped ones) fails with the next error and don't get executed at all:It seems like the
test
module has been tested or is more indented to have a single top leveldescribe
ortest
entry, not allowing to have several ones.How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
All
describe
s andtest
s are being executed and reported, both passing and failing ones, no matter of their order of if they are insidedescribe
/ sub-tests.What do you see instead?
Only first
describe
/ sub-test is being reported, any other top leveltest
ordescribe
are excluded from reports.Additional information
It seems there are several inter-related errors on this issue.
The text was updated successfully, but these errors were encountered: