Skip to content

QA-TEST-006 — Retry abuse hiding flakiness ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-TEST-006.

FieldValue
Severitywarning
Confidencehigh
Tierquarantine
Measured FP rate36% (n=11)
Evidence levelE2
QA impactFlaky-test risk (FLAKY-RISK)
False-positive risk (author estimate)low
Autofix availableno
Languagestypescript, javascript
Frameworksjest, vitest, playwright, mocha
Detection strategyLEXICAL
Introduced inv0.1.0

Why this fails in production ​

Global retries re-run every failing test until it passes — intermittent failures become invisible.

What gets flagged (real detector output) ​

`jest.retryTimes(3)` enabled.

Example from this rule's own must-fire fixture: tests/fixtures/QA-TEST-006/must-fire/retries.spec.ts

The fix ​

Remove the global retry; fix the underlying nondeterminism instead.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-TEST-006/must-not-fire/clean.spec.ts — a legitimate, similar-looking pattern this rule correctly leaves alone.

Corpus-measured false-positive risk ​

Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):

RepoOccurrences
apache-airflow3
grafana-grafana2
positive-fixtures5
vercel-next-js1

Released under the MIT License.