mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-06 01:20:41 +00:00
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:
@@ -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'],
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user