node.jstypescriptvisual-studio-codejestjs

VS Code not recognizing Jest, underlining with Intellisense


I'm using VS Code in a Typescript project that uses Jest for testing. For some reason, VS Code thinks that the Jest globals are not available:

VS Code intellisense underlining Jest in red

I have the Jest typedefs installed in my dev dependencies.

"devDependencies": {
    // ...truncated
    "@types/jest": "^20",
    "jest": "^20.0.4",
    "ts-jest": "^20.0.7",
    "ts-node": "^5.0.0",
    "typescript": "~2.4.0"
}

Solution

  • I upgraded my version of Typescript to 2.8 and this problem went away. I'm going to assume it was some sort of cache issue.