* commit at some point in the middle, WIP * formatting * ci passing * comments * handle no jobid case * better error handling * comments * Update orchestrator/src/client/hooks/queries/useJobMutations.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update orchestrator/src/client/hooks/queries/useSettingsMutation.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * better types * formatter * tracking inbox page * in progress page * tracer links page * invalidate harder * ensure tracer links docs show --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
18 lines
650 B
TypeScript
18 lines
650 B
TypeScript
import type { QueryClient } from "@tanstack/react-query";
|
|
import { describe, expect, it, vi } from "vitest";
|
|
import { queryKeys } from "@/client/lib/queryKeys";
|
|
import { invalidateJobData } from "./invalidate";
|
|
|
|
describe("invalidateJobData", () => {
|
|
it("invalidates in-progress board when invalidating a specific job", async () => {
|
|
const invalidateQueries = vi.fn().mockResolvedValue(undefined);
|
|
const queryClient = { invalidateQueries } as unknown as QueryClient;
|
|
|
|
await invalidateJobData(queryClient, "job-1");
|
|
|
|
expect(invalidateQueries).toHaveBeenCalledWith({
|
|
queryKey: queryKeys.jobs.inProgressBoard(),
|
|
});
|
|
});
|
|
});
|