build(fc2c-i): add Vitest harness and run it in CI

This commit is contained in:
2026-05-15 21:09:52 -04:00
parent 681d7777f3
commit 6bc7689f6e
3 changed files with 13 additions and 1 deletions
+1
View File
@@ -55,4 +55,5 @@ jobs:
# with no .ts files and no JSDoc annotations, so vue-tsc has nothing # 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 # to type-check. Re-enable once we add a tsconfig.json and either
# convert to TS or add JSDoc. # convert to TS or add JSDoc.
- run: npm run test:unit
- run: npm run build - run: npm run build
+3 -1
View File
@@ -10,6 +10,7 @@
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",
"test:unit": "vitest run",
"check": "vue-tsc --noEmit" "check": "vue-tsc --noEmit"
}, },
"dependencies": { "dependencies": {
@@ -24,6 +25,7 @@
"vite": "^5.2.0", "vite": "^5.2.0",
"vue-tsc": "^2.0.0", "vue-tsc": "^2.0.0",
"vite-plugin-vuetify": "^2.0.0", "vite-plugin-vuetify": "^2.0.0",
"sass": "^1.71.0" "sass": "^1.71.0",
"vitest": "^2.1.0"
} }
} }
+9
View File
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'node',
include: ['test/**/*.spec.js'],
passWithNoTests: true
}
})