diff --git a/src/main/ipc/filesystem/filesystem-repository-status-index.test.ts b/src/main/ipc/filesystem/filesystem-repository-status-index.test.ts index e00ab823fc4..d4b91e053d2 100644 --- a/src/main/ipc/filesystem/filesystem-repository-status-index.test.ts +++ b/src/main/ipc/filesystem/filesystem-repository-status-index.test.ts @@ -1,5 +1,5 @@ -import { afterEach, expect, it, vi } from 'vitest' -import { handlers } from './filesystem-test-harness' +import { afterEach, beforeEach, expect, it, vi } from 'vitest' +import { handlers, resetFilesystemIpcMocks } from './filesystem-test-harness' import type { StateWriteListener } from '../../persistence/loading-store/write-scheduling' const read = vi.hoisted(() => @@ -26,6 +26,8 @@ import { registerFilesystemGitStatusHandlers } from './filesystem-git-status-han import { createFilesystemHandlerContext } from './filesystem-handler-context' import { createSenderScopedRequestCancellations } from '../sender-scoped-request-cancellation' +beforeEach(resetFilesystemIpcMocks) + const originalPlatform = process.platform afterEach(() => Object.defineProperty(process, 'platform', { configurable: true, value: originalPlatform }) diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-repository-publication.test.tsx b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-repository-publication.test.tsx index 78e40e4d349..084dbb38cc3 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-repository-publication.test.tsx +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-repository-publication.test.tsx @@ -120,6 +120,7 @@ it.each([1, 10])( ] }) await act(() => vi.advanceTimersByTimeAsync(1000)) + await act(() => vi.advanceTimersByTimeAsync(1000)) const initialPublications = fixture.publications.length fixture.projections.clear() act(() => start()) @@ -196,6 +197,7 @@ it.each(['hide', 'input'] as const)( ] }) await act(() => vi.advanceTimersByTimeAsync(1000)) + await act(() => vi.advanceTimersByTimeAsync(1000)) const empty = fixture.result.current[0].ignored const before = fixture.publications.length await act(async () => { diff --git a/src/renderer/src/runtime/source-control/git/runtime-git-client.test.ts b/src/renderer/src/runtime/source-control/git/runtime-git-client.test.ts index 48893fb1111..40c0230f79f 100644 --- a/src/renderer/src/runtime/source-control/git/runtime-git-client.test.ts +++ b/src/renderer/src/runtime/source-control/git/runtime-git-client.test.ts @@ -84,7 +84,10 @@ beforeEach(() => { cancelGenerateCommitMessage: gitCancelGenerateCommitMessage }, runtime: { call: runtimeCall }, - runtimeEnvironments: { call: runtimeEnvironmentTransportCall } + runtimeEnvironments: { + call: runtimeEnvironmentTransportCall, + cancelSubscription: vi.fn().mockResolvedValue(undefined) + } } }) })