Using test.concurrent causes test report to attribute console output incorrectly
#9267
Unanswered
wenninger-stephan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
We are using Vitest in a larger project and I noticed that when using
test.concurrent, the resulting test report (we are usingjunitxml format) incorrectly attributes the console outputs to the respective tests. Some console output is even missing completely, however only from the test report file, we are also using thedefaultreporter, and when we pipe its console output to a file, we can see all console output (however also not attributed to the correct test).Are the test reporters supposed to handle
test.concurrent? Are we missing some setting that is needed for this to work?Reproduction is given below:
package.jsontsconfig.jsontest/concurrent.test.tsrunning
npx vitest run --reporter=default --reporter=junit --outputFile=reports/vitest.junit.xmlafternpm installshows the behavior. On my machine it results in the followingreports/vitest.junit.xmlSame for the machine of a colleague, so the output seems "deterministic" in that sense.
As you can see, some console output is attributed incorrectly to Test 4 in the
concurrentcases.Is this a (known) bug/limitation?
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions