Skip to content

bug: --typecheck produces one task per browser instance #7870

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

Open
6 tasks done
nwidynski opened this issue Apr 21, 2025 · 2 comments
Open
6 tasks done

bug: --typecheck produces one task per browser instance #7870

nwidynski opened this issue Apr 21, 2025 · 2 comments
Labels
feat: typecheck Issues and PRs related to typechecking feature pending triage

Comments

@nwidynski
Copy link

nwidynski commented Apr 21, 2025

Describe the bug

Type checking should be independent from browser instances, since they don't affect each other.

While i think tsc isn't invoked more than once per module, the test suite is reported once per file<->project combination, while it should only be reported once. This distorts the reported suite runtime and convolutes the console report in general.

Here is what it currently looks like:

Image

Here is how i would expect it to look like:

Image

Reproduction

Add multiple test.browser.instances and enable typecheck via vitest. You will observe typecheck being reported once per browser instance, although it is independent. The typecheck result duration will also be the same for each module, while still being summed for summary reporting.

System Info

OSX, [email protected], vitest@latest, vite@latest

Used Package Manager

npm

Validations

@nwidynski nwidynski changed the title bug: --typecheck produces one tasks per browser instances bug: --typecheck produces one task per browser instances Apr 22, 2025
Copy link

Hello @nwidynski. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@nwidynski
Copy link
Author

@AriPerkkio https://stackblitz.com/edit/vitest-tests-browser-examples-5prfthrv?file=vitest.config.ts

Execute npm run test, which runs typechecking with vitest. You can observe a typecheck being reported for each browser instance and the runtime being wrongly reported.

@nwidynski nwidynski changed the title bug: --typecheck produces one task per browser instances bug: --typecheck produces one task per browser instance Apr 22, 2025
@AriPerkkio AriPerkkio added feat: typecheck Issues and PRs related to typechecking feature and removed needs reproduction labels Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: typecheck Issues and PRs related to typechecking feature pending triage
Projects
None yet
Development

No branches or pull requests

2 participants