element-call-Github/vitest.config.js
Robin 7bca541cb6
Perform dead code analysis with Knip (#2575)
* Install Knip

* Clarify an import that was confusing Knip

* Fix issues detected by Knip

Including cleaning up some unused code and dependencies, using a React hook that we unintentionally stopped using, and also adding some previously undeclared dependencies.

* Run dead code analysis in lint script and CI

---------

Co-authored-by: Timo <toger5@hotmail.de>
2024-08-28 02:06:57 +02:00

25 lines
548 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",
},
},
isolate: false,
setupFiles: ["src/vitest.setup.ts"],
coverage: {
reporter: ["html", "json"],
include: ["src/"],
},
},
}),
),
);