element-call-Github/vitest.config.js
Robin 251918a6ad Enable test isolation
I had experimented with turning this off in order to improve test performance, and apparently that ended up being merged. Now if we're to do component testing, we'll be changing things globally on the document, so isolation is very much necessary.
2024-09-06 18:40:18 -04:00

24 lines
524 B
JavaScript

import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config.js";
export default defineConfig((configEnv) =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
test: {
environment: "jsdom",
css: {
modules: {
classNameStrategy: "non-scoped",
},
},
setupFiles: ["src/vitest.setup.ts"],
coverage: {
reporter: ["html", "json"],
include: ["src/"],
},
},
}),
),
);