-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CTRL+C does not exit tests in watch mode #4956
Copy link
Copy link
Closed
Labels
help wantedExtra attention is neededExtra attention is neededp2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)
Description
Describe the bug
When I am running tests in watch mode and make some minor changes in the test files, after a while, vitest can not exit watch mode. Hitting CTRL+C multiple times does not work either. I tried to isolate the problem, but strangely this only happens when some tests are run together.
Running vitest with pnpm run test:server or pnpm run test:native does not make vitest hang. But running pnpm run test:only which is a combination of both previous tests makes vitest hang after a while. In the only-native.spec.ts file I am using Fastify native, in the only-server.spec.ts file Fastify is completely mocked out.
Reproduction
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
Memory: 15.87 GB / 30.73 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.8.0 - ~/.nvm/versions/node/v20.8.0/bin/node
npm: 10.1.0 - ~/.nvm/versions/node/v20.8.0/bin/npm
pnpm: 8.14.0 - ~/.local/share/pnpm/pnpm
Browsers:
Chrome: 120.0.6099.216
npmPackages:
vite: ^5.0.11 => 5.0.11
vitest: ^1.2.0 => 1.2.0Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededp2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)