mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-07 22:16:50 +02:00
Use fake-indexeddb to provide IndexedDB API in Node.js test environment. This fixes 10 failing tests in spellbook-storage.test.ts that were previously blocked by missing IndexedDB. Changes: - Add fake-indexeddb as dev dependency - Create vitest setup file that imports the polyfill - Update vitest.config.ts to use setup file - Fix relay-selection.test.ts to clear cache between tests for isolation
16 lines
289 B
TypeScript
16 lines
289 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: "node",
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
});
|