element-call-Github/vitest.config.js

25 lines
596 B
JavaScript
Raw Normal View History

2024-02-16 11:34:59 +08:00
import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config.js";
2024-02-16 11:34:59 +08:00
export default defineConfig((configEnv) =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
test: {
environment: "jsdom",
css: {
modules: {
classNameStrategy: "non-scoped",
},
},
setupFiles: ["src/vitest.setup.ts"],
2024-02-16 11:34:59 +08:00
coverage: {
reporter: ["html", "json"],
include: ["src/"],
exclude: ["src/**/*.{d,test}.{ts,tsx}", "src/utils/test.ts"],
2024-02-16 11:34:59 +08:00
},
},
}),
),
);