From 000ee66cfe157772894a5708b02eb1aba3082206 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 8 Jul 2026 17:00:33 +0200 Subject: [PATCH] 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. --- vitest.config.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vitest.config.ts b/vitest.config.ts index 2dc9382c6..c5e908e4b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -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"],