b41c1d2501
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61) Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com> Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { vi } from "vitest";
|
|
|
|
vi.mock("@nexus/application", async (importOriginal) => {
|
|
const actual = await importOriginal<typeof import("@nexus/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;
|