Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests don't update without a refresh #578

Closed
4 tasks done
jroitgrund opened this issue Jan 24, 2025 · 1 comment
Closed
4 tasks done

Tests don't update without a refresh #578

jroitgrund opened this issue Jan 24, 2025 · 1 comment

Comments

@jroitgrund
Copy link

Describe the bug

Same as #472 and #485:

  • continuous run mode doesn't work
  • Run test, change code, save file, run test again -> the test is run with the old version of the code
  • Run test, change code, save file, refresh tests, and then run test again -> this works correctly

Reproduction

Image

I'm working on deleting as much company-specific stuff from the repo as possible so I can post a link to a cloneable repro soon 🤞 but wanted to throw this out there in case anyone else is seeing it.

Output

[14:10:49] Initiating deferred test run
[INFO 14:10:49] Running 1 file(s) with name pattern: ^\s?repro
[14:10:49] The runner is starting because tests apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts were started due to a file change
[14:10:49] Enqueuing "needs a refresh"
[14:10:49] No task result for "repro.test.ts [@tw/assistant]", ignoring
[14:10:49] No task result for "repro", ignoring
[14:10:49] Enqueuing "needs a refresh" because it was just collected
[14:10:49] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:49] No errors found for "repro"
[14:10:49] Marking "needs a refresh" as running
[14:10:49] Marking "needs a refresh" as passed
[14:10:49] No errors found for "repro"
[14:10:49] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:49] Ending test run apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts
[14:10:56] Initiating deferred test run
[INFO 14:10:56] Running 1 file(s) with name pattern: ^\s?repro needs a refresh$
[14:10:56] The runner is starting because tests apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts were started due to a file change
[14:10:56] Enqueuing "needs a refresh"
[14:10:56] No task result for "repro.test.ts [@tw/assistant]", ignoring
[14:10:56] No task result for "repro", ignoring
[14:10:56] Enqueuing "needs a refresh" because it was just collected
[14:10:56] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:56] No errors found for "repro"
[14:10:56] Marking "needs a refresh" as running
[14:10:56] Marking "needs a refresh" as passed
[14:10:56] No errors found for "repro"
[14:10:56] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:56] Ending test run apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts
[14:10:57] Initiating deferred test run
[INFO 14:10:57] Running 1 file(s) with name pattern: ^\s?repro needs a refresh$
[14:10:57] The runner is starting because tests apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts were started due to a file change
[14:10:57] Enqueuing "needs a refresh"
[14:10:57] No task result for "repro.test.ts [@tw/assistant]", ignoring
[14:10:57] No task result for "repro", ignoring
[14:10:57] Enqueuing "needs a refresh" because it was just collected
[14:10:57] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:57] No errors found for "repro"
[14:10:57] Marking "needs a refresh" as running
[14:10:57] Marking "needs a refresh" as passed
[14:10:57] No errors found for "repro"
[14:10:57] No errors found for "repro.test.ts [@tw/assistant]"
[14:10:57] Ending test run apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts
[14:10:59] Disposing test runner
[14:10:59] Ending test run <none>
[INFO 14:11:02] [API] Vitest process 0.21188789659263096 closed successfully
[Error 14:11:07] [API] Failed to close Vitest process [Error Error] Vitest process did not exit in time
Error: Vitest process did not exit in time
    at Timeout._onTimeout (/Users/jonathan/.vscode/extensions/vitest.explorer-1.10.6/dist/extension.js:18:5948)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)
[INFO 14:11:07] [API] Running Vitest v2.1.4 (quotez-monorepo/vitest.workspace.ts) with "node  /Users/jonathan/.vscode/extensions/vitest.explorer-1.10.6/dist/worker.js"
[INFO 14:11:08] [Worker] �[33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.�[39m
[INFO 14:11:08] [Worker] �[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.�[39m
[INFO 14:11:08] [Worker] �[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.�[39m
[INFO 14:11:08] [API] Watching /Users/jonathan/code/quotez-monorepo/vitest.workspace.ts
[INFO 14:11:08] [VSCODE] Watching quotez-monorepo with pattern **/*
[INFO 14:11:08] [API] Collecting tests: apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts [@tw/assistant]
[14:11:08] Not starting the runner because tests are being collected for apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts
[14:11:08] There is no test run for "repro.test.ts [@tw/assistant]"
[14:11:08] No test run to finish for apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts
[14:11:10] Initiating deferred test run
[INFO 14:11:10] Running 1 file(s) with name pattern: ^\s?repro needs a refresh$
[14:11:10] The runner is starting because tests apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts were started due to a file change
[14:11:10] Enqueuing "needs a refresh"
[14:11:10] No task result for "repro.test.ts [@tw/assistant]", ignoring
[14:11:10] No task result for "repro", ignoring
[14:11:10] Enqueuing "needs a refresh" because it was just collected
[14:11:10] No errors found for "repro.test.ts [@tw/assistant]"
[14:11:10] No errors found for "repro"
[14:11:10] Marking "needs a refresh" as running
[14:11:10] Marking "needs a refresh" as failed with 1 errors
[14:11:10] No errors found for "repro"
[14:11:10] No errors found for "repro.test.ts [@tw/assistant]"
[14:11:10] Ending test run apps/assistant/app/api/relocations/[relocationId]/generate-area-info/repro.test.ts

Extension Version

1.10.6

Vitest Version

2.0.4

Validations

@jroitgrund
Copy link
Author

Can no longer repro, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant