-
Notifications
You must be signed in to change notification settings - Fork 295
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode Intellisense is not suggesting available methods in JEST #440
Comments
I'm facing the same problem. Testing works fine, but methods aren't suggested. |
same for me as well. |
I'm having the same problem. I've tried installing @types/jest with |
I found that I need to restart vscode after installing @types/jest if vscode was open during installation. Can anyone confirm if that is expected? |
create after saving reload vscode. |
For some reason this solution doesn't work for me. Interesting is that I found a post from Nicholas Zakas post with the solution you are proposing. I'm wondering if I need to tell vscode about |
mine only works after i install node v10.15.0
|
None of the provided solutions works for me. Guess what else can I try |
Try to create a new user in your computer with a fresh installation of vscode and do |
Install |
Thanks, Guys, as mentioned above just the below in jsconfig.json works for me.
|
install local and global types, works fine |
Including the test folder in tsconfig fixed it for me.
|
This worked for me too. I have the orta.vscode-jest extension installed and am running a react 16 project with |
Only problem is that it then compiles the code test project folder. Still not a great solution... |
Installing @types/jest solved the problem while adding this to jsconfig.js could not help |
Yup, yesterday it wasn't working. I closed and went to sleep and it is working now. I did a lot of window reload yesterday but didn't work either. |
before read this issue i thought need an extension like jest -published by orta- . but after installing @types/jest and reload vs-code the methods suggested successfully by vs-code :) |
P.S Doing both steps worked for me, and the last one 🙂
|
According to jest-community/vscode-jest#440 (comment) installing @types/jest fixes Jest autocompletion. That was the case for me.
In my vscode this solution works very well. |
Dude, thank you so much |
my case was an outdated version of |
My case was opening VSCode at the root of our repo, rather than the src folder which contained our jest.config.js and tsconfig.json files. When I opened the src folder as a VSCode Project, everything worked as expected. |
@dil-dbakker Thank you! This was exactly my problem. I tried about a thousand complicated config options people were proposing but I was just one directory "too high" opening a parent directory in VSCode. Running |
This suggestion worked for me very well. Thanks for the feedback @Waserman |
great thread to help people resolving similar issues. But since this issue is really not related to this extension, I will close it. |
I was experiencing this same sort of problem where intellisense would not show the available jest methods despite doing what almost every thread on the topic suggests I was able to resolve it but I don't know why this works. remove My resulting config looks like this (minus work specific stuff) The packages I have installed relevant to testing I don't totally know why this works but it's worth a shot if you were stuck like me |
Another workaround is to use explicit import: "However, if you prefer explicit imports, you can do import {describe, expect, test} from '@jest/globals'."as documented here https://jestjs.io/docs/api PS: I was not able to solve the problem with other suggest methods. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Environment
node -v
: v.9.2.0npm -v
: 5.5.1npm ls jest
ornpm ls react-scripts
(if you haven’t ejected):npm ls jest
+-- [email protected]
-- [email protected]
-- [email protected]your vscode-jest settings if customized:
Operating system: Windows_NT x64 10.0.17134
Prerequisite
Steps to Reproduce:
Create a new react app using
1 .npx create-react-app my-app
2. npm install --save-dev jest
3. Opened the project in VSCode.
Expected Behavior
I expect VS Code intellisense would assist me with available methods from JEST.
Actual Behavior
VS Code is not suggesting me any method suggestions for JEST test cases.
The text was updated successfully, but these errors were encountered: