Skip to content

QA-PW-116 — storageState without expiry strategy ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-PW-116.

FieldValue
Severitywarning
Confidencemedium
Tierextended
Measured FP rate0% (n=10)
Evidence levelE1
QA impactFlaky-test risk (FLAKY-RISK)
False-positive risk (author estimate)medium
Autofix availableno
Languagestypescript, javascript
Frameworksplaywright
Detection strategyLEXICAL
Introduced inv0.3.0

Why this fails in production ​

Auth cookies/tokens expire; when they do, every test using the stale state fails identically and the suite looks catastrophically broken.

What gets flagged (real detector output) ​

`storageState` used without a visible expiry/refresh strategy.

Example from this rule's own must-fire fixture: tests/fixtures/QA-PW-116/must-fire/no-refresh.config.ts

The fix ​

Regenerate the state in a setup project per run, or assert validity before reuse.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-PW-116/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
positive-fixtures1

Released under the MIT License.