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

watcher throws an error after removing existing test files #7398

Open
6 tasks done
soc221b opened this issue Feb 1, 2025 · 0 comments · May be fixed by #7399
Open
6 tasks done

watcher throws an error after removing existing test files #7398

soc221b opened this issue Feb 1, 2025 · 0 comments · May be fixed by #7399
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@soc221b
Copy link

soc221b commented Feb 1, 2025

Describe the bug

In watch mode, it will throws an error when we remove an existing test files and then trigger a rerun because existing test file cache is not deleted after the unlink function is invoked.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-ng9dneil

  1. wait until "Waiting for file changes..." appears
  2. rename test/basic.test.ts to test/renamed.test.ts
  3. wait until "Waiting for file changes..." appears again
  4. press a to run all tests

System Info

System:
  OS: macOS 14.5
  CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Memory: 1.00 GB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
  Yarn: 1.22.15 - ~/.yarn/bin/yarn
  npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
  pnpm: 9.15.4 - ~/Library/pnpm/pnpm
  bun: 1.2.0 - ~/Library/pnpm/bun
  Watchman: 2024.01.22.00 - /usr/local/bin/watchman
Browsers:
  Chrome: 132.0.6834.160
  Safari: 17.5
npmPackages:
  @vitest/browser: workspace:* => 3.0.4 
  @vitest/coverage-istanbul: workspace:* => 3.0.4 
  @vitest/coverage-v8: workspace:* => 3.0.4 
  @vitest/ui: workspace:* => 3.0.4 
  vite: ^5.4.0 => 5.4.0 
  vitest: workspace:* => 3.0.4

Used Package Manager

npm

Validations

@hi-ogawa hi-ogawa added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants