Files
MajoorWaldi-ComfyUI-Majoor-…/vitest.config.mjs
T
Ewald 85a82f130a test: migrate ui/tests from .mjs to .ts
- Rename 132 *.vitest.mjs -> *.vitest.ts
- Rename vitest.setup.mjs -> vitest.setup.ts
- Rename helpers/vitestEnvironment.mjs -> vitestEnvironment.ts
- Delete settings_store.test.mjs (Node test runner, superseded by .vitest.ts)
- Fix .mjs imports in vitest.setup.ts and grid_loader_adaptive_paging.vitest.ts

Config updates:
- vitest.config.mjs: setupFiles, include, coverage.include -> .ts
- tsconfig.test.json: new dedicated config for test files (strict:false)
- knip.json: update project pattern for tests
- package.json: add typecheck:tests script (audit-only)
2026-05-26 13:04:05 +02:00

29 lines
712 B
JavaScript

import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [vue()],
test: {
environment: "node",
setupFiles: ["ui/tests/vitest.setup.ts"],
transformMode: {
web: [/\.vue$/],
},
include: ["ui/tests/**/*.vitest.ts"],
reporters: ["default"],
coverage: {
provider: "v8",
include: ["ui/**/*.{js,ts}"],
exclude: ["ui/tests/**", "ui/app/i18n.generated.js", "node_modules/**"],
reporter: ["text", "text-summary", "lcov"],
reportsDirectory: "coverage/ui",
thresholds: {
lines: 30,
branches: 20,
functions: 30,
statements: 30,
},
},
},
});