Skip to content

test state is in "pending" when beforeAll failed #4820

@hi-ogawa

Description

@hi-ogawa

Describe the bug

I'm creating a dedicated issue based on the discussion in #4799 (comment)

Current behavior seems to be that the test state is kept in "pending" when beforeAll failed, but the desired behavior might be to mark those tests as "skipped".

Here is a repro and a screenshot of Vitest UI:

https://stackblitz.com/edit/vitest-dev-vitest-yr2mrp?file=test%2Frepro.test.ts

Show screenshot

image

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-yr2mrp?file=test%2Frepro.test.ts

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.10.5 - /usr/local/bin/pnpm
  npmPackages:
    @vitest/ui: latest => 1.1.0 
    vite: latest => 5.0.10 
    vitest: latest => 1.1.0

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions