Take-over mode doesn't work with TS Jest
See original GitHub issueWhen take-over mode is enabled, Jest tests written in TS no longer work as it doesn’t resolve the jest types.
I don’t have a reproduction ready as it would take quite some time to do so, but once I get back from holidays I might have some time to create one based on the started template.
The current steps to reproduce (for me) are as follows:
- Disable built in “TypeScript and JavaScript Language Features”
- Enable “take-over mode”
- any
*.spec.ts
file that uses@types/jest
will show errors in the IDE because TS can’t resolve the types - Switching on “TypeScript and JavaScript Language Features” resolves the issue
Additional info
We work in a monorepo, so we have multiple tsconfigs (I know this is an issue currently). Everything else seems to work great in take-over mode. This is the only issue we’re facing.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Use Take Over Mode instead of TS Plugin #471 - GitHub
How Take Over Mode resolve Volar Mode problem? Take Over Mode don't use VSCode built-in TypeScript extension, only use Vue language server to...
Read more >VSCode showing "cannot find module" TS error for .vue import ...
Reload the workspace. Takeover mode will be enabled when you open a Vue or TS file. (Optional) If you have set custom path...
Read more >Options | ts-jest - GitHub Pages
When using TypeScript Jest config file, Jest will use ts-node to compile the config file. ts-jest doesn't take part in that process. Options....
Read more >Testing Vite with minimal config using Vitest - LogRocket Blog
Let's discuss how Vitest works, compare it with a popular test suite configuration (Jest and Babel), explore the ways Vitest can simplify ...
Read more >ts-jest - npm
ts -jest is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dschreij it seem same problem to #661, should be fix in next version.
I swear it wasn’t working the other day… seems fine now in my case. Not sure about the original posters use case.