Run a Cypress test in all browsers besides Firefox?

looper003 asked this question 2 months ago
looper003 on Mar 14 · 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 17 days ago

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 17 days ago

You use the value.

const isFirefox = === "firefox"
0 replies
nick 16 days ago

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