Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
cypress-plugin-retries
Advanced tools
Cypress plugin allowing tests to retry a configurable amount of times
Please report bugs in the issues of this repo.
Please refer to this issue for updates about official cypress retry support
Add the plugin to devDependencies
npm install -D cypress-plugin-retries
At the top of cypress/support/index.js
:
require('cypress-plugin-retries')
Use the environment variable CYPRESS_RETRIES
to set the retry number for all spec files:
CYPRESS_RETRIES=2 npm run cypress
or Use Cypress.env('RETRIES')
in your spec file to set the retry number for all tests:
Cypress.env('RETRIES', 2)
or On a per-test or per-hook basis, set the retry number:
Note: this plugin adds Cypress.currentTest and you should only access it in the context of this plugin.
it('test', () => {
Cypress.currentTest.retries(2)
})
or [undersirable] Use mocha
's this.retries(n)
inside of a test:
Note: must use
function()
notation, not arrows()=>{}
it('test', function() {
this.retries(2)
})
beforeEach
and afterEach
hooks that apply the test will be re-ranbeforeAll(before)
hooks are not re-ran on retry. These are guaranteeed only to be ran once.beforeEach
hook, the test will retryafterEach
/afterAll
hook, the test will not retry, but fail as normal (if you want to retry an afterEach hook, see this issue)FAQs
Cypress plugin allowing tests to retry a configurable amount of times
The npm package cypress-plugin-retries receives a total of 4,392 weekly downloads. As such, cypress-plugin-retries popularity was classified as popular.
We found that cypress-plugin-retries 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.