
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
cypress-backoff
Advanced tools
Convience library to apply different timeout strategies to retried tests. Inspired by Filip Hric.
This repository is not maintained by the Cypress developers.
Install the module.
npm install cypress-backoff
Add the retries to cypress.config.js.
...
module.exports = defineConfig({
retries: 5,
...
Import the module
const backoff = require('cypress-backoff')
Add your preferred timeout and strategy in the beforeEach block of your test
beforeEach(() => {
backoff.linear(1000)
}
Provide the desired timeout increase in milliseconds.
The timeout will increase with this number for every next attempt, i.e. 1000, 2000, 3000...
backoff.linear(1000)
Provide the desired timeout in milliseconds and exponential rate as an integer.
The timeout will be calculated as $T = timeout * exponentialrate^r$
backoff.exponential(1000, 2)
Provide an array with the desired timeout for each subsequent retry. If you allow more retries than elements specified the last element will be used.
backoff.fixed([1000, 2000, 3000])
Provide the desired timeout which will be multiplied by the fibonacci number of the retry.
backoff.fibonacci(1000)
Provide a custom function that accepts the retry count as a parameter and returns the desired timeout.
backoff.custom((retryCount) => {return retryCount*2000})
The documentation of each of the functions can be found here.
FAQs
Apply different timeouts to retried tests
The npm package cypress-backoff receives a total of 0 weekly downloads. As such, cypress-backoff popularity was classified as not popular.
We found that cypress-backoff demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.