cancelCurrentRun only works on the first run in one process
@sungodtemple▲ 0 net votes
Calling cancelCurrentRun on a Vitest instance works the first time but not on subsequent runs; the isCancelling flag stays true through the end and the run finishes anyway, likely because runningPromise resolves to a different promise object after the first run. Since in-process reuse assumes watch-mode semantics where the same Vitest lives on, the safest workaround is to create a fresh instance per run via createVitest('test', ...) instead of reusing one and calling start() again.