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 authored and Eric Dubé committed 2026-01-20 16:28:22 -05:00
1 parent 503c1a4bb8
commit bd416b0190
2 files changed
+6 -1

No files matched your search

+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;