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

Error code of test run with not default reporter always 0 even with unhandled error #6831

Closed
6 tasks done
underoot opened this issue Oct 31, 2024 · 1 comment
Closed
6 tasks done
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@underoot
Copy link

Describe the bug

When you have in the list of reporters any other than basic reporters, the vitest process always exits with a 0 status code. If you have the default or the basic reporter process exit, in case of an unhandled error, with status code 1.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-5r9pk4

npm run test:run — everything okay, we see error and echo $? gives us 1
CI=1 npm run test:run — not okay: we don't see error and echo $? gives us 0

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.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitest/ui: latest => 2.1.4 
    vite: latest => 5.4.10 
    vitest: latest => 2.1.4

Used Package Manager

npm

Validations

@AriPerkkio AriPerkkio added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Oct 31, 2024
@AriPerkkio
Copy link
Member

Fixed by #6808.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants