vitest-dev / vitest

Next generation testing framework powered by Vite.
https://vitest.dev
MIT License
13.05k stars 1.17k forks source link

Text reporter still creates a coverage/.tmp/ folder when test fail #6538

Closed fkworld closed 1 month ago

fkworld commented 1 month ago

Describe the bug

Related to #5722

Run

npx vitest run --coverage --coverage.reporter=text

If test fail, you will get coverage/.tmp/ folder.

Reproduction

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

System Info

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 1.78 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - /usr/local/bin/node
    npm: 10.8.3 - /usr/local/bin/npm
    pnpm: 9.10.0 - /usr/local/bin/pnpm
  Browsers:
    Safari: 18.0

Used Package Manager

npm

Validations

fkworld commented 1 month ago

I solved this problem by adding the option "reportOnFailure: true".

But I don't think this is the final way.