Commit 7593128
fix(tests): prevent async-retry timer leak in licenseFetcher tests
Add jest.clearAllTimers() and jest.useRealTimers() to afterEach to
prevent "Cannot log after tests are done" errors caused by async-retry's
internal setTimeout callbacks escaping the fake timer boundary.
The issue occurred because async-retry schedules retries via setTimeout,
and when jest.useRealTimers() was called, pending microtasks could fire
after the test completed.
See: jestjs/jest#10487
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2ceb06f commit 7593128
1 file changed
Lines changed: 5 additions & 8 deletions
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
120 | | - | |
121 | | - | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | | - | |
163 | | - | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
203 | | - | |
204 | 201 | | |
205 | 202 | | |
206 | 203 | | |
0 commit comments