DEV Community

Discussion on: 10 principles of scalable frontend projects

Collapse
 
mah_khalafallah profile image
Mahmoud Khalafallah

Great, I think cypress is meant to be used in e2e testing not integration, would do you think?

Collapse
 
renatoruk profile image
Renato Ruk

Hello Mahmoud! 👋

I think Cypress is so versatile that you could actually use it for unit, integration and e2e altogether. For example, they have a section about unit testing in the docs -> docs.cypress.io/examples/examples/...

I believe it's also suited for integration tests. In terms of web apps, integration tests don't have a stric definition what they consist of. For example, an integration test could be a storybook story with cypress network mocks, but it's also amazing for e2e. Unit testing is feasible, but I still prefer Jest for that.

What do you use for unit and integration?

Collapse
 
mah_khalafallah profile image
Mahmoud Khalafallah

Hi Renato
I got you, I'm using Jest for both Unit and Integration testing and cypress for e2e, but now I may try to use cypress in integration testing as well!
Thanks