angularjasmine

Angular Unit Tests Property 'toBeTruthy' does not exist on type 'Assertion'


Currently in a project Ive been assigned to there is an issue with VSCode not being able to determine the properties for the Jasmine assertions. The tests run successfully, but intellisense in VSCode cannot determine the package. This project has cypress configured along side jasmine, but I dont see any conflicts in the tsconfig.spec.json. enter image description here

enter image description here


Solution

  • I was able to follow @aghwotu recommendation and added the below to my tsconfig.json in my root. This created other issues, but fixed my issue with VSCode not finding the jasmine Assertions.

    "exclude": ["cypress.config.ts"],
    "files": ["cypress.config.ts"]