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.

VSCode Intellisense is not suggesting available methods in JEST

See original GitHub issue

Environment

  1. node -v: v.9.2.0

  2. npm -v: 5.5.1

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): npm ls jest ±- jest@24.5.0 -- react-scripts@2.1.8 – jest@23.6.0

  4. your vscode-jest settings if customized:

    • jest.pathToJest? [fill]
    • jest.pathToConfig? [fill]
    • anything else that you think might be relevant? [fill]
  5. Operating system: Windows_NT x64 10.0.17134

Prerequisite

  • are you able to run jest test from command line? yes
  • how do you run your tests from command line? npm run test

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:30
  • Comments:28

github_iconTop GitHub Comments

328reactions
cassiobockcommented, Apr 16, 2019

I’m having the same problem. I’ve tried installing @types/jest with npm i @types/jest and the suggestions started to show again.

78reactions
Wasermancommented, Aug 29, 2019

create jsconfig.json in the root directory of your project. the file should contain the following: { "typeAcquisition": { "include": [ "jest" ] } }

after saving reload vscode. Worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode Intellisense is not suggesting available methods in ...
Opened the project in VSCode. Expected Behavior. I expect VS Code intellisense would assist me with available methods from JEST. Actual Behavior. VS...
Read more >
Intellisense for Jest not working in VS code - Stack Overflow
You first have to install jest locally or globally: npm i jest . Assuming you have a project of two directories like backend...
Read more >
Intellisense For Jest Not Working In Vs Code - ADocLib
Learn about Visual Studio Code IntelliSense (intelligent code completion). ... (if VSCode Intellisense is not suggesting available methods in JEST #440 I ......
Read more >
Setting up Visual Studio Code intellisense for Jest globals
This instructs to look at the jest module for type definitions. With this configuration setup in jsconfig. json , Visual Studio Code will...
Read more >
jest intellisense vscode - Code Examples & Solutions For This ...
1. create jsconfig.json in the root directory of your project. ; 2. the file should contain the following: ; 3. { "typeAcquisition": {...
Read more >

github_iconTop Related Medium Post

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