question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Take-over mode doesn't work with TS Jest

See original GitHub issue

When 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:

  1. Disable built in “TypeScript and JavaScript Language Features”
  2. Enable “take-over mode”
  3. any *.spec.ts file that uses @types/jest will show errors in the IDE because TS can’t resolve the types
  4. 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
johnsoncodehkcommented, Nov 5, 2021

@dschreij it seem same problem to #661, should be fix in next version.

1reaction
Bobakanooshcommented, Oct 3, 2021

I swear it wasn’t working the other day… seems fine now in my case. Not sure about the original posters use case.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found