vitest-dev / vitest-dev/vitest

bug: `--typecheck` produces one task per `browser` instance

Open
#7,870 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: typecheck pending triage
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

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, tsx@5.8.3, vitest@latest, vite@latest
Used Package Manager

npm

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with multiple test.browser.instances and typecheck enabled via Vitest. Inspect how tsc and the typecheck result are reported for each file-project and browser-instance combination. Done means the suite is reported once independently of browser instances, with durations no longer duplicated or summed per instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.