diff --git a/packages/api/src/__tests__/resource-router.test.ts b/packages/api/src/__tests__/resource-router.test.ts index 9a82726..59ad664 100644 --- a/packages/api/src/__tests__/resource-router.test.ts +++ b/packages/api/src/__tests__/resource-router.test.ts @@ -443,6 +443,10 @@ describe("resource router", () => { }); it("counts imported TBD draft projects in chargeability stats only when proposed work is enabled", async () => { + vi.useFakeTimers(); + vi.setSystemTime(new Date("2026-03-15T12:00:00.000Z")); + + try { const db = { resource: { findMany: vi.fn().mockResolvedValue([ @@ -494,6 +498,9 @@ describe("resource router", () => { expect(strict[0]?.expectedChargeability).toBeGreaterThan(0); expect(withProposed[0]?.actualChargeability).toBeGreaterThan(strict[0]?.actualChargeability ?? 0); expect(withProposed[0]?.expectedChargeability).toBe(strict[0]?.expectedChargeability); + } finally { + vi.useRealTimers(); + } }); it("excludes regional public holidays from chargeability stats", async () => {