Test the editor with Vitest: grid and top bar rules, the store, and the components in jsdom

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-18 08:26:43 +02:00
parent 6148dfd211
commit 8d11de8a28
13 changed files with 1750 additions and 38 deletions
+13
View File
@@ -0,0 +1,13 @@
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vitest/config";
// Unit and component tests of the editor: the grid rules, the top bar rules, the store and the components,
// in jsdom. `npm test` runs them; `npm run test:watch` while developing.
export default defineConfig({
plugins: [vue()],
test: {
environment: "jsdom",
include: ["tests/**/*.spec.ts"],
restoreMocks: true,
},
});