When comparing Jasmine vs Cypress, the Slant community recommends Jasmine for most people. In the question“What are the best JavaScript unit testing frameworks?” Jasmine is ranked 3rd while Cypress is ranked 4th. The most important reason people chose Jasmine is:
If you prefer your test cases and applications to be developed from the perspective of your stake holders, Jasmine is the framework for you.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Behaviour Driven Development focused
If you prefer your test cases and applications to be developed from the perspective of your stake holders, Jasmine is the framework for you.
Pro Easy to find Jasmine tutorials for most MV* frameworks,
whilst Mocha is still considered the new kid on the block.
Pro Has a very readable and user-friendly syntax
Code readability is an important factor, if the application development involves multiple teams; if the testing team is unable to read your test cases then they won't be able to test it. Jasmine resolves this issue by providing developers with an extremely simple and "human-friendly" syntax.
Pro Allows both DOM-less as well as asynchronous testing
If you have some test cases that do not involve testing of DOM elements or events, those are exactly the ones where you want to use Jasmine. It'll provide smooth, simple and easy DOM-less testing of those test cases.
Pro Integrates very well with Ruby on Rails
The jasmine-rails gem allows you to run Jasmine specs in a browser (powered by Rails engine mounted into your application).
Pro Web UI to develop tests quickly
You can edit your test code in the browser and instantly see it run as you change the code.
Pro Easy to record a video
It can easily record a video so you can understand what happened when a test failed in your CI.
Pro Amazing dashboard to view reports and recordings
The Cypress dashboard allows you to see every run on a great UI linked to commits and gitflow.
Pro Cross Browser testing
https://docs.cypress.io/guides/guides/cross-browser-testing.html
Chrome
Firefox
Edge
Electron
Brave
Cons
Con Maintainers are not very responsive to pull requests
Pivotal aren't responsive to pull requests, though they have made repo changes within < 3 months
Con Doesn't support Safari
Con Single tab only
Does not and will not support multiple tabs or multiple simultaneous browsers.
See https://docs.cypress.io/guides/references/trade-offs.html#Permanent-trade-offs-1
Con Heavy in setup
Do not add Cypress in the main repo. Have a specific test repo for it or you will be sorry when the CI/CD flow takes 5-6 min longer every build due to installation time of Cypress.