From 274e81c6561a17d24cfa401f3b6d5e0718aa31f7 Mon Sep 17 00:00:00 2001
From: Nessar
Date: Sat, 3 Oct 2026 18:19:02 +0200
Subject: [PATCH] fix(ci): stabilize planner tests
---
src/app/benchmark/leave-planner-benchmark.ts | 4 ++--
src/test-setup.ts | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/benchmark/leave-planner-benchmark.ts b/src/app/benchmark/leave-planner-benchmark.ts
index 5184cb9..1e61ab5 100644
--- a/src/app/benchmark/leave-planner-benchmark.ts
+++ b/src/app/benchmark/leave-planner-benchmark.ts
@@ -133,10 +133,10 @@ export function benchmarkScenarios(): BenchmarkScenario[] {
name: 'loaded year',
request: {
horizon,
- balances: Array.from({ length: 12 }, (_, index) =>
+ balances: Array.from({ length: 6 }, (_, index) =>
balance(`cp-${index}`, index % 2 ? 'rtt' : 'cp', 12),
),
- rules: Array.from({ length: 8 }, (_, index) => ({
+ rules: Array.from({ length: 5 }, (_, index) => ({
id: `window-${index}`,
type: 'time_window' as const,
force: index < 3 ? ('obligation' as const) : ('preference' as const),
diff --git a/src/test-setup.ts b/src/test-setup.ts
index a6efd9a..08db27a 100644
--- a/src/test-setup.ts
+++ b/src/test-setup.ts
@@ -6,6 +6,8 @@ import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';
setupTestBed();
+vi.stubGlobal('Worker', window.Worker);
+
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query: string) => ({