Cypress testing (E2E and component) conflicts with Jasmine #27225
Replies: 1 comment
-
Hi,
All my cypress-Tests are in the cypress-folder. And then I created a new tsconfig.json in the cypress folder where I added
and other project specific settings. Explenation for the exclude: ts needs to know about the cypress-folder. Therefore you need to add it to the root tsconfig. But you don't want it in the tsconfig.app.json and tsconfig.spec.json. So you exclude it again. And in the tsconfig for cypress you override the exclude with an empty Array, so that the cypress folder is included again. I figured, that for e2e-Tests that works fine and the tsconfig.json in the cypress-folder is used. But for component-tests it does not.
for more Info to that, look at https://docs.cypress.io/guides/component-testing/angular/overview#Options-API I hope, that helps. |
Beta Was this translation helpful? Give feedback.
-
I am currently trying to set up Cypress component testing in my Angular application. I already have Cypress E2E testing set up as well as Jasmine unit tests. Before setting up the component tests, my tsconfig.json file excluded files related to Cypress in order to get past the issue of global type conflicts between Cypress and Jasmine. However, this configuration now prevents me from using "cy.anything" in my component tests. Wondering if anyone else has configured an Angular application to work with Cypress E2E and component tests as well as Jasmine unit tests.
Beta Was this translation helpful? Give feedback.
All reactions