vitest-dev / vscode

VS Code extension for Vitest
https://vitest.dev/vscode
MIT License
740 stars 83 forks source link

[v0.5.9 pre-release] Continuous run stop working if one of the imported file is updated #318

Open MangelMaxime opened 5 months ago

MangelMaxime commented 5 months ago

Describe the bug

When updated the code of an imported file, continuous mode doesn't trigger even if I re-save the test file himself.

Stopping / Start continuous doesn't work, I need to re-start VSCode for it to work again.

Reproduction

  1. Open vitest-dev/vscode/samples/basic folder
  2. Click Start continunous mode (global)
  3. Select the run config
  4. Open add.test.js and force save the file
  5. Tests should run
  6. Go to add.ts and make a change to the file + save
  7. Tests are not running, when on the non pre-release version they re-run
  8. Open add.test.js and force save the file
  9. Nothing happens (tests should be re-run)

Only way to make Continous mode working again is by reloading VSCode.

https://github.com/vitest-dev/vscode/assets/4760796/a126e72e-75bd-4131-8421-79f38a81b818

System Info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 77.20 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/Library/Caches/fnm_multishells/4208_1711128498880/bin/node
    Yarn: 1.22.22 - ~/Library/Caches/fnm_multishells/4208_1711128498880/bin/yarn
    npm: 10.1.0 - ~/Library/Caches/fnm_multishells/4208_1711128498880/bin/npm
    pnpm: 8.13.1 - ~/Library/Caches/fnm_multishells/4208_1711128498880/bin/pnpm
    bun: 1.0.18 - ~/.bun/bin/bun
  IDEs:
    VSCode: 1.87.2 - /usr/local/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Browsers:
    Chrome: 123.0.6312.59
    Safari: 17.4
  npmPackages:
    vite: ^2.8.6 => 2.9.17 
    vitest: ^1.4.0 => 1.4.0

Used Package Manager

npm

Validations

sheremet-va commented 5 months ago

This should be fixed in 0.5.13. I am adding a label here to add a test to catch regression in the future.