Use vitest's default for scoped class names

It reduces confusion when reading snapshots if class names are still scoped to their respective CSS modules. It also discourages the use of class names in tests, which is a good thing. (https://testing-library.com/docs/guiding-principles)

Thanks to Johannes for the suggestion.
This commit is contained in:
Robin
2026-07-08 17:00:33 +02:00
parent 58a8b7316e
commit 000ee66cfe

View File

@@ -18,12 +18,7 @@ export default defineConfig((configEnv) =>
extends: true,
test: {
name: "unit",
css: {
include: /.+/,
modules: {
classNameStrategy: "non-scoped",
},
},
css: { include: /.+/ },
setupFiles: ["src/vitest.setup.ts"],
environment: "jsdom",
include: ["src/**/*.test.ts", "src/**/*.test.tsx"],