vitest-dev / vitest-dev/vitest
Enable --typecheck by default?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Clear and concise description of the problem
Right now, if you want to use the awesome new Testing Types, you have to provide a manual --typecheck:
npx vitest --typecheck
I think we can assume many types testing users go with the default behavior of putting all types tests in .test-d.ts files:
✓ src/a.test.ts (9 tests) 5ms
✓ src/b.test.ts (10 tests) 6ms
✓ TS src/c.test-d.ts (0 test)
Suggested solution
How about enabling --typecheck by default?
Alternative
Or, failing that, some subset of --typecheck that does not impact non-*.test-d.ts files? I'll admit I'm not deeply familiar with the mode to know if there's some conflict.
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
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 reading the Testing Types guide and running the documented npx vitest --typecheck example. Trace where the --typecheck CLI option is configured and check how .test-d.ts files are handled. Done means type checking is enabled by default without changing behavior for regular test files, or the supported subset is clearly defined and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100