reviewing-flaky-tests
Installation
SKILL.md
Flaky Test Review
Priority Order
HIGH - Breaks tests unpredictably:
- No
alias:oroverload:mocks - breaks parallel tests - No
Http::sequence()in parallel - responses consumed unpredictably - Cache cleared BEFORE mocking - cache wins over mocks
-
createFromFormat()chainsstartOfDay()- preserves wall clock otherwise - Fakes BEFORE factory creation - afterCreating hooks run immediately
-
Passport::actingAs($user, ['scope'])includes scopes - 403 means missing scope
MEDIUM - Intermittent failures:
- Time frozen with
startOfMinute()- usestartOfSecond()only when needed - Custom cleanup BEFORE
parent::tearDown() -
partialMock()beforeshouldReceive()on facades - Partial fakes:
Bus::fake([SpecificJob::class])- let others run