Skip to content
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

jest test failed in fixture is marked as skipped #1226

Open
tematef opened this issue Jan 20, 2025 · 2 comments
Open

jest test failed in fixture is marked as skipped #1226

tematef opened this issue Jan 20, 2025 · 2 comments
Labels
theme:jest Jest related issue

Comments

@tematef
Copy link

tematef commented Jan 20, 2025

Description
Failed in preconditions jest test is marked as skipped within allure report

To Reproduce
Steps to reproduce the behavior:

  1. clone project from https://github.com/tematef/fixture-bug
  2. npm install
  3. jest
  4. allure generate
  5. observe report

Expected behavior
Test should be marked as broken (yellow color), since it has broken step within it's lifecycle.
It is confusing that broken test is shown the same as tests disabled by technical reasons or disabled due to specific environment conditions

console log

` FAIL test/bug.test.ts
✕ new test (1 ms)

● new test

ERROR

  1 |
  2 | beforeAll(async () => {
> 3 |     throw new Error("ERROR");
    |           ^
  4 | });
  5 | test(`new test`, async () => {
  6 |

  at Object.<anonymous> (test/bug.test.ts:3:11)

Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.268 s, estimated 1 s
Ran all test suites.
`
Screenshot
Image

@delatrie delatrie added the theme:jest Jest related issue label Jan 21, 2025
@ma-nk
Copy link

ma-nk commented Jan 23, 2025

Looks like a bug in the reporter

@AlexsandroZapani
Copy link

The same happens to me when the test breaks, I'm using Cypress, I updated to 3.1.0, but the situation persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:jest Jest related issue
Projects
None yet
Development

No branches or pull requests

4 participants