vitest-dev / vitest-dev/vitest
bug: `--typecheck` produces one task per `browser` instance
Nobody has claimed this yet.
- 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:
Here is how i would expect it to look like:
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
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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