Cypress 4: Now Supports Firefox and Edge

With the release of version 4, Cypress is now a cross-browser testing tool. It includes support for Firefox and the new Edge browser.

12 Feb 2020


As of February 6th, Cypress is now a cross-browser testing tool!! Firefox support has been under development for the best part of two years now whilst support for Edge happened as a result of the new release of the browser.

As with any major release, or sometimes minor (I’m looking at you 3.5.0 😒), there will be breaking changes.

cy.contains() Ignores Invisible Whitespaces

Browsers ignore leading, trailing and duplicate whitespaces. And Cypress now does that, too.

<p>Hello, World</p>
// This should now pass in version 4+
cy.get('p').contains('Hello, World')

// This should now fail in version 4+

Node.js 8+ Only

The minimum version for Node has been bumped up to 8+, however, you should already be at least on the latest LTS version.

Dependencies Update

Some of the underlying dependencies that Cypress uses has also been upgraded. As you can see below, the difference in versions are big, expect some API changes.

NameVersion BeforeVersion After
Chai3. Guide
Sinon.js3. Guide


Calling the done() callback and returning a promise in test will result in an error. This error originates from Mocha itself.


Version 4.2.0 brings some breaking changes for some assertions.

Assertions that expect numbers will cause them to fail if non-numbers are passed in.

// This will fail

Non-existent properties will also now appear as failures.

// Previously, this will pass.
// However, if you were using TypeScript this should not happen.


Stubbing a non-existent properties of an object will cause the test to fail.

The reset() methods for stubs and spies have been renamed to resetHistory().

const spy = cy.spy()
const stub = cy.stub()


Get Started

If you still haven’t tried Cypress yet, here’s a post I wrote that should hopefully help you through.

Similar Posts

Cypress Part I: Getting Started

In this new series, we look at how we could include Cypress as part of our testing strategy for our single page applications.

15 Nov 20195-minute read

Typescript 3.7

The new version of TypeScript has been released and with it comes optional chaining as well as nullish coalescing!

05 Nov 20191-minute read

Cypress: A New Way of Testing UI

Have you ever tested a single page app with Selenium? It can be cumbersome and flaky, Cypress aims to fix those issues.

03 Nov 20192-minute read