46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { vi } from "vitest";
|
|
|
|
vi.mock("@capakraken/application", async (importOriginal) => {
|
|
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
|
return {
|
|
...actual,
|
|
getDashboardBudgetForecast: vi.fn().mockResolvedValue([]),
|
|
listAssignmentBookings: vi.fn().mockResolvedValue([]),
|
|
};
|
|
});
|
|
|
|
vi.mock("../lib/audit.js", () => ({
|
|
createAuditEntry: vi.fn().mockResolvedValue(undefined),
|
|
}));
|
|
|
|
import { executeTool as executeAssistantTool } from "../router/assistant-tools.js";
|
|
|
|
export { createToolContext } from "./assistant-tools-holiday-test-helpers.js";
|
|
|
|
export function createHolidayCalendar(
|
|
overrides: Record<string, unknown> = {},
|
|
): Record<string, unknown> {
|
|
return {
|
|
id: "cal_de",
|
|
name: "Germany National",
|
|
scopeType: "COUNTRY",
|
|
stateCode: null,
|
|
isActive: true,
|
|
priority: 0,
|
|
country: { id: "country_de", code: "DE", name: "Germany" },
|
|
metroCity: null,
|
|
entries: [
|
|
{
|
|
id: "entry_1",
|
|
date: new Date("2026-01-01T00:00:00.000Z"),
|
|
name: "New Year",
|
|
isRecurringAnnual: true,
|
|
source: "seed",
|
|
},
|
|
],
|
|
...overrides,
|
|
};
|
|
}
|
|
|
|
export const executeTool = executeAssistantTool;
|