From 6bc7689f6eb4d759a06a2bc46d32f0bade7b9fc2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 15 May 2026 21:09:52 -0400 Subject: [PATCH] build(fc2c-i): add Vitest harness and run it in CI --- .forgejo/workflows/ci.yml | 1 + frontend/package.json | 4 +++- frontend/vitest.config.js | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 frontend/vitest.config.js diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index b4b60a9..4e43ee6 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -55,4 +55,5 @@ jobs: # with no .ts files and no JSDoc annotations, so vue-tsc has nothing # to type-check. Re-enable once we add a tsconfig.json and either # convert to TS or add JSDoc. + - run: npm run test:unit - run: npm run build diff --git a/frontend/package.json b/frontend/package.json index d123574..d68122c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,6 +10,7 @@ "dev": "vite", "build": "vite build", "preview": "vite preview", + "test:unit": "vitest run", "check": "vue-tsc --noEmit" }, "dependencies": { @@ -24,6 +25,7 @@ "vite": "^5.2.0", "vue-tsc": "^2.0.0", "vite-plugin-vuetify": "^2.0.0", - "sass": "^1.71.0" + "sass": "^1.71.0", + "vitest": "^2.1.0" } } diff --git a/frontend/vitest.config.js b/frontend/vitest.config.js new file mode 100644 index 0000000..99bf7a0 --- /dev/null +++ b/frontend/vitest.config.js @@ -0,0 +1,9 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + environment: 'node', + include: ['test/**/*.spec.js'], + passWithNoTests: true + } +})