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.
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"]
I encountered the same problem today. I know the problem is already a year old, but perhaps the answer will help someone else who also runs into this.
I added the following to my tsconfig.json
:
"exclude": [
"cypress/**/*.ts",
"cypress.config.ts"
]
And I changed my cypress/tsconfig.json
, which extends the tsconfig.json
, to:
"include": [
"**/*.ts",
"../cypress.config.ts"
],
"exclude": []
This solved my issues with types and functions not being recognized in my .spec files and also kept my Cypress e2e tests running.
I hope this still helps you or someone else.
If the above do not work for you, creating a “Solution Style” tsconfig.json file worked for me.
© 2022 - 2024 — McMap. All rights reserved.
ng add @cypress/[email protected]
and then added./cypress.config.ts
to thetsconfig.exclude
property like so:"exclude": ["./cypress.config.ts"]
Here is the cypress issue on Github: github.com/cypress-io/cypress/issues/… – Digitate