From dcaff792941dbd3eac727ca6a1975157456d4760 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 12 Dec 2024 12:29:49 +0100 Subject: [PATCH] fix: tests --- tests/unit/setup.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/unit/setup.ts b/tests/unit/setup.ts index 2b65f14eb..4fb13dd26 100644 --- a/tests/unit/setup.ts +++ b/tests/unit/setup.ts @@ -3,16 +3,20 @@ import { beforeAll, vi } from 'vitest'; beforeAll(() => { vi.mock('$app/environment', () => ({ - browser: true + dev: true, + building: false, + browser: true, + page: { + params: { + project: 'tests', + region: 'tests' + } + } })); vi.mock('$app/navigation', () => ({ goto: vi.fn(), beforeNavigate: vi.fn() })); - vi.mock('$app/environment', () => ({ - dev: true, - browser: true - })); vi.mock('$env/static/public', () => import.meta.env); vi.mock('$env/dynamic/public', () => ({ env: import.meta.env