-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
JUNIT reporter doesn't mark test as failed if the beforeAll
throws error
#4516
Comments
What is your expectation here? Do you expect all tests to have the same error? I am not actually sure what JUNIT spec defines this situation. Does it support a single |
Reading this it seems junit allows only failed testcases, not suites. However not reporting the failiures at all does seem worse to me instead of reporting the same failiure to each testcase affecte by the bad |
I do agree that we need to show them, I am just not sure how. Maybe jest has an answer. |
With Jest the individual test cases are not run and every test case is reported as failing with the same error in |
It looks like a failure in https://stackblitz.com/edit/vitest-dev-vitest-m7bw4w?file=junit.xml |
Describe the bug
When a beforeAll hook throws an error, the generated JUNIT report will report all tests in that describe block as without failiure, ergo succeeded.
That doesn't seem right to me.
Reproduction
I set up a minimal example in this stackblitz:
https://stackblitz.com/edit/vitest-dev-vitest-brpfrz
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: