-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Description
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 other describe gets no reported nor counted, both passing or failing. In fact, final report don't provide correct statistics at all:
TAP version 13
# Subtest: /home/piranna/Trabajo/Avrioc/EsDiPi/test/cli.js
# longestStatic: 36
# length: 85917
# Subtest: clean-sdp
ok 1 - clean-sdp # SKIP
---
duration_ms: 2.336453
...
# Subtest: compress
ok 2 - compress # SKIP
---
duration_ms: 0.057482
...
# Subtest: empty esdipi
ok 3 - empty esdipi
---
duration_ms: 5.970628
...
# Subtest: Offer esdipi
ok 4 - Offer esdipi
---
duration_ms: 21.166008
...
# Subtest: Answer esdipi
ok 5 - Answer esdipi
---
duration_ms: 9.956793
...
1..8
ok 1 - /home/piranna/Trabajo/Avrioc/EsDiPi/test/cli.js
---
duration_ms: 104.264871
...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 106.675893It 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" describes, and 1 failed top level one not shown.
If there are other skipped describes, they are shown as skipped, but there's no info of any other describe or test defined it. In fact, if I have tests 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 that test that's passing to be executed before the describes, lefting one test that's failing to execute after the describes, then the first test and all the describes (including the skipped ones) fails with the next error and don't get executed at all:
not ok 2 - clean-sdp # SKIP
---
duration_ms: 0
failureType: 'cancelledByParent'
error: 'Promise resolution is still pending but the event loop has already resolved'
code: 'ERR_TEST_FAILURE'
stack: |-
process.emit (node:events:512:28)
...It seems like the test module has been tested or is more indented to have a single top level describe or test entry, not allowing to have several ones.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
All describes and tests are being executed and reported, both passing and failing ones, no matter of their order of if they are inside describe / sub-tests.
What do you see instead?
Only first describe / sub-test is being reported, any other top level test or describe are excluded from reports.
Additional information
It seems there are several inter-related errors on this issue.