Cannot find name ‘describe’. Do you need to install type definitions for a test runner?

I’m using Visual Studio Code as my IDE and in my Angular project, and I had to comment-out/remove types in file tsconfig.json and add “jest” in types in tsconfig.spec.json.

File tsconfig.json

{
  "compilerOptions": {
    // "types": []
  }
}

File tsconfig.spec.json

{
  "compilerOptions": {
    "types": ["jest", "node"]
  }
}

Leave a Comment