Run a Cypress test in all browsers besides Firefox?

looper003 asked this question 10 months ago
looper003 on Mar 14, 2022 · Edited

I need to run a specific Cypress test in each browser besides Firefox.

So, when Cypress is using Firefox as the browser it runs tests in, this specific test would not be ran.

In my Cypress code, I could then do something like this:

if (!firefox) {
  // run the test

How can I do this in Cypress?

3 suggested answers
tweetybird on May 7, 2022

You can get the name of the current browser being used by Cypress via This will return a browser name in the "firefox", "chrome", "electron", etc. format.

To only run a test in browsers that are not Firefox, you can do this:

if ( !== "firefox") {
  // run the test
0 replies
coderguy on May 7, 2022

You use the value.

const isFirefox = === "firefox"
0 replies
nick on May 7, 2022

Cypress has @cypress/skip-test NPM package you can use for this.

It provides a skipOn() method you could use to skip Firefox:

it('skips on Firefox', () => {
0 replies