vscode icon indicating copy to clipboard operation
vscode copied to clipboard

How to disable rerun on save?

Open rad182 opened this issue 2 years ago • 2 comments

It seems it automatically reruns the test file on file save even watch mode is off

To Reproduce just save the test file

Expected behavior Should not rerun on save because watch mode is off

Screenshots image

Environment

(Paste info.txt content generated by the example project)

  • OS: macOS m1
  • VSCode version: 1.69.2
  • Vitest version: ^0.12.6
  • Vitest plugin version: v0.2.23

rad182 avatar Aug 04 '22 06:08 rad182

It won't rerun on save if it's not in the watch mode. Can you reproduce this issue stablely?

zxch3n avatar Aug 06 '22 03:08 zxch3n

@zxch3n this happens when I change to "vitest.commandLine": "npx vitest" even for the example project The reason I need to use npx vitest so I can add coverage so npx vitest --coverage since it seems the default one doesn't read the vite.config.ts that it should generate coverage.

rad182 avatar Aug 08 '22 01:08 rad182

Is this still happening on the latest version?

zxch3n avatar Aug 30 '22 14:08 zxch3n

Correct me if I'm wrong, but I think the issue here is that this extension requires Vitest to be run in watch mode (due to its reliance on the API), but when the test run finishes, the watch process is never closed - that's what I see on my end.

luxaritas avatar Aug 31 '22 18:08 luxaritas

Hm, actually I guess not - looks like that was a stale process from a point where I had commandLine set incorrectly. Disregard, I suppose!

luxaritas avatar Aug 31 '22 18:08 luxaritas