Commit 4f83ed7
test(readFile): restore console.warn spy in afterEach to prevent leakage
Addresses CodeRabbit nitpick: several tests installed vi.spyOn(console, "warn")
without restoring it, leaking the mock across tests. Added a scoped afterEach
that restores console.warn only (via vi.isMockFunction guard) so the suite's
module-level mocks are left intact. 75 tests pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent c70b1a9 commit 4f83ed7
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
198 | 207 | | |
199 | 208 | | |
200 | 209 | | |
| |||
0 commit comments