reactjsvisual-studio-codejestjsintellisense

Intellisense for Jest not working in VS code


Edit: Run npm install @types/jest --save-dev To fix

Just trying to type it() and the auto suggestion is isTag

enter image description here

I've tried adding a jsconfig.json

{
"compilerOptions": {
    "target": "es6"
},
"exclude": [
    "node_modules",
    "assets"
  ]
}

Thank you for anyone who has a suggestion for this!!


Solution

  • Add to your jsconfig.json(create in the root of your project if not present):

    {
        "typeAcquisition": {
            "include": [
                "jest"
            ]
        }
    }
    

    If this do not work try with this command:

    npm install @types/jest
    

    or

    yarn add -D @types/jest