mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-14 18:01:21 +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:
1 parent
503c1a4bb8
commit
bd416b0190
2 files changed
+6
-1
No files matched your search
@@ -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