Fix git status browser test mocks
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
0a3812afb3
commit
f3bc116544
3 files changed
+6
-3
No files matched your search
@@ -43,7 +43,8 @@ import { DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts/settings";
|
||||
vi.mock("../lib/gitStatusState", () => ({
|
||||
useGitStatus: () => ({ data: null, error: null, cause: null, isPending: false }),
|
||||
useGitStatuses: () => new Map(),
|
||||
refreshGitStatus: () => undefined,
|
||||
refreshGitStatus: () => Promise.resolve(null),
|
||||
resetGitStatusStateForTests: () => undefined,
|
||||
}));
|
||||
|
||||
const THREAD_ID = "thread-browser-test" as ThreadId;
|
||||
|
||||
@@ -19,7 +19,7 @@ const {
|
||||
toastUpdateSpy,
|
||||
} = vi.hoisted(() => ({
|
||||
invalidateGitQueriesSpy: vi.fn(() => Promise.resolve()),
|
||||
refreshGitStatusSpy: vi.fn(),
|
||||
refreshGitStatusSpy: vi.fn(() => Promise.resolve(null)),
|
||||
runStackedActionMutateAsyncSpy: vi.fn(() => new Promise<never>(() => undefined)),
|
||||
setThreadBranchSpy: vi.fn(),
|
||||
toastAddSpy: vi.fn(() => "toast-1"),
|
||||
@@ -107,6 +107,7 @@ vi.mock("~/lib/gitReactQuery", () => ({
|
||||
|
||||
vi.mock("~/lib/gitStatusState", () => ({
|
||||
refreshGitStatus: refreshGitStatusSpy,
|
||||
resetGitStatusStateForTests: () => undefined,
|
||||
useGitStatus: vi.fn(() => ({
|
||||
data: {
|
||||
branch: BRANCH_NAME,
|
||||
|
||||
@@ -28,7 +28,8 @@ import { BrowserWsRpcHarness } from "../../test/wsRpcHarness";
|
||||
vi.mock("../lib/gitStatusState", () => ({
|
||||
useGitStatus: () => ({ data: null, error: null, cause: null, isPending: false }),
|
||||
useGitStatuses: () => new Map(),
|
||||
refreshGitStatus: () => undefined,
|
||||
refreshGitStatus: () => Promise.resolve(null),
|
||||
resetGitStatusStateForTests: () => undefined,
|
||||
}));
|
||||
|
||||
const THREAD_ID = "thread-kb-toast-test" as ThreadId;
|
||||
|
||||
Reference in new issue
Block a user