DEV Community

Discussion on: Wow! Cypress can run unit tests! 🥳

Collapse
dgreene1 profile image
Dan Greene Author • Edited on

They’re really different tools entirely. I’d recommend you try Cypress out to see how it lends itself better to end-to-end or mocked API end-to-end tests as where mocha is a unit testing tool. As shown above Cypress can also do unit testing too but it’s a newer thing for Cypress.

I reach for both when the timing is right (although I rarely use Mocha anymore since if I need to write unit tests I use Jest and in most other places I rely on TypeScript to enforce things).

Cypress gives me sanity. :)