mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
Add Vitest 4 with happy-dom, @vue/test-utils, and a single test/storybook.test.ts that auto-discovers every story under src/v2/lib and runs its play() via composeStories — no Playwright, just composition-based interaction tests. 89 stories now smoke-pass in CI. Scripts: lint:fix (auto-fix), lint (now scoped to ./src/v2; v1 is frozen), lint:all (legacy sweep), test, test:watch, test:ui, storybook:test. eslint.config.js gets argsIgnorePattern: "^_" so unused-by-design parameters can use the underscore convention. CI: new frontend.yml runs lint, test, build in parallel on frontend/** changes; typecheck.yml bumped to Node 22 with cached npm ci. Existing typecheck job preserved for branch protection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
671 B
TypeScript
26 lines
671 B
TypeScript
import vue from "@vitejs/plugin-vue";
|
|
import { URL, fileURLToPath } from "node:url";
|
|
import vuetify from "vite-plugin-vuetify";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
plugins: [vue(), vuetify({ autoImport: true })],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
"@v2": fileURLToPath(new URL("./src/v2", import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
environment: "happy-dom",
|
|
globals: true,
|
|
setupFiles: ["./vitest.setup.ts"],
|
|
include: ["src/**/*.{test,spec}.ts", "test/**/*.{test,spec}.ts"],
|
|
server: {
|
|
deps: {
|
|
inline: ["vuetify"],
|
|
},
|
|
},
|
|
},
|
|
});
|