Skip to content

Commit 3f72964

Browse files
committed
Revert "fix(test): clear spy mock calls after beforeEach setup"
This reverts the mockClear() calls that were causing test failures on all platforms. The mockClear() calls themselves were triggering additional spy invocations, making the problem worse. Need to investigate the root cause of platform-specific test failures more carefully.
1 parent 03a5e05 commit 3f72964

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

test/stdio/stderr.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ describe('stdio/stderr', () => {
4747
cursorToSpy = vi.spyOn(stderr, 'cursorTo').mockImplementation(() => {})
4848
// @ts-expect-error - Vitest spy type doesn't match ReturnType<typeof vi.spyOn>
4949
clearLineSpy = vi.spyOn(stderr, 'clearLine').mockImplementation(() => {})
50-
51-
// Clear any calls made during setup
52-
writeSpy.mockClear()
53-
cursorToSpy.mockClear()
54-
clearLineSpy.mockClear()
5550
})
5651

5752
afterEach(() => {

test/stdio/stdout.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ describe('stdio/stdout', () => {
6262
.spyOn(stdout, 'clearScreenDown')
6363
// @ts-expect-error - Vitest mock type doesn't match expected implementation signature
6464
.mockImplementation(() => {})
65-
66-
// Clear any calls made during setup
67-
writeSpy.mockClear()
68-
cursorToSpy.mockClear()
69-
clearLineSpy.mockClear()
70-
clearScreenDownSpy.mockClear()
7165
})
7266

7367
afterEach(() => {

0 commit comments

Comments
 (0)