···190190 }
191191192192 // Manually stop the processes so that each test don't have to do this themselves
193193- afterEach(async () => {
193193+ onTestFinished(async () => {
194194 if (subprocess.exitCode === null) {
195195 subprocess.kill()
196196 }
···206206 return output()
207207 }
208208209209- if (args[0] !== 'list' && args.includes('--watch')) {
209209+ if (args[0] !== 'list' && (args.includes('--watch') || args[0] === 'watch')) {
210210 if (command === 'vitest') {
211211 // Wait for initial test run to complete
212212 await cli.waitForStdout('Waiting for file changes')