You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New test files are not detected.
Once detected, previous results are shown.
See reproduction section.
Reproduction
Use this repository.
Start with a clean repo.
Open in VSCode.
pnpm install
cd samples/basic
pnpm install
cd ../..
pnpm run dev
Hit F5 to run the extension. samples/basic project will open.
Create a new file, test/bug.test.ts, paste this content:
import { expect, test } from 'vitest';
test('fail', () => {
expect(1).toEqual(2);
})
Hit save.
Expected:
I'd expect to see the green arrow to run the test.
Even if I open another file and go back to this one, I don't see the green arrow.
I can run the test by opening VSCode's test panel and click "Run all". Then it's detected.
Once detected, the green button will appear. But when I click it, previous test run is returned.
You can see that by changing the expect line to expect(1).toEqual(1) .
The test should succeed when you click the green button next to it, but won't until you click it again.
Output
[INFO 17:54:14] [v1.2.17] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 17:54:15] [API] Running Vitest v1.4.0 (basic/vitest.config.ts) with [email protected]: /home/user/.nvm/versions/node/v20.13.1/bin/node
[INFO 17:54:15] [Worker] Starting inspector on 127.0.0.1:53815 failed: address already in use
[INFO 17:54:16] [API] Vitest v1.4.0 (basic/vitest.config.ts) process 52987 created
[INFO 17:54:35] [Worker] Collecting tests due to file changes: test/bug.test.ts
[INFO 17:54:37] [Worker] Collecting tests due to file changes: test/bug.test.ts
It might not be a duplicate, although similar. #483 says: The only way to rerun tests files and get new data is to click "Refresh tests"
Multiple issues have been introduced into the 1.2.x versions. This issue existed before #483 got introduced where the only way is to click "refresh all".
Duplicate or not, this one at least provides the missing Reproduction section.
Describe the bug
New test files are not detected.
Once detected, previous results are shown.
See reproduction section.
Reproduction
Use this repository.
pnpm install
cd samples/basic
pnpm install
cd ../..
pnpm run dev
Expected:
I'd expect to see the green arrow to run the test.
Even if I open another file and go back to this one, I don't see the green arrow.
I can run the test by opening VSCode's test panel and click "Run all". Then it's detected.
Once detected, the green button will appear. But when I click it, previous test run is returned.
You can see that by changing the expect line to
expect(1).toEqual(1)
.The test should succeed when you click the green button next to it, but won't until you click it again.
Output
Version
1.2.17 (63f3dfe)
Validations
The text was updated successfully, but these errors were encountered: