
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
jest-retries
Advanced tools
Tired of manually re-running your CI when flaky tests fail? Puppeteer fails sporadically? Envy your friends because they use jest-circus? No more!
npm i -D jest-retries
const retry = require('jest-retries');
retry('Do flaky work', 5, () => {
expect(irregularFunction()).toBe('sporadic');
});
That's it!
No configurations, no arguments, just require jest-retries and use it instead of test()
.
You sure can!
const test = require('jest-retries');
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min;
}
test('Random value should eventually resolve to 1', 100, () => {
expect(getRandomInt(0, 2)).toBe(1);
});
Plesae feel free to ask for features by creating issues, or to implement features by creating pull requests. I'll do my best to review things as fast as I can, as I always try to do.
If you find any errors or strange behaviors, please report them by creating an issue.
This project is licensed under the MIT License.
FAQs
Automatically retry flaky tests with Jest
The npm package jest-retries receives a total of 3,508 weekly downloads. As such, jest-retries popularity was classified as popular.
We found that jest-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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.