Commit 03a5e05
committed
fix(test): clear spy mock calls after beforeEach setup
Added mockClear() calls after creating spies in beforeEach to prevent
setup calls from interfering with test assertions. This fixes test
failures on Windows CI where mock call counts were higher than expected.
Affected tests:
- test/stdio/stderr.test.ts (4 tests)
- test/stdio/stdout.test.ts (preventive fix)
Fixes mock call count assertions to only count calls made during the
actual test, not during beforeEach setup.1 parent 9f37123 commit 03a5e05
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
0 commit comments