test: ensure kv global is always available

This is comitted separately from the commit for AppService.comp.test.js
that will follow because it interacts with all other test cases. It did
not cause any issue based on what I observed, but I'm still wrapping it
in a separate commit in case we need to revert or change it later.
This commit is contained in:
KernelDeimos
2026-01-12 18:42:04 -05:00
committed by Eric Dubé
parent 503c1a4bb8
commit bd416b0190
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { defineConfig } from 'vitest/config';
export default defineConfig(({ mode }) => ({
test: {
globals: true,
setupFiles: [],
setupFiles: ['./vitest.setup.js'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'json-summary', 'html', 'lcov'],
+5
View File
@@ -0,0 +1,5 @@
// Vitest setup file - runs before all test files
// Initializes globalThis.kv which is required by PermissionService and other services
import { kv } from './src/util/kvSingleton';
globalThis.kv = kv;