From 000ee66cfe157772894a5708b02eb1aba3082206 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 8 Jul 2026 17:00:33 +0200 Subject: [PATCH 1/3] 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 2dc9382c..c5e908e4 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"], From 943ce5b853abf429de053c97512c85112091176f Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 8 Jul 2026 17:06:09 +0200 Subject: [PATCH 2/3] Update test snapshots to use scoped class names --- src/__snapshots__/AppBar.test.tsx.snap | 16 +- src/__snapshots__/Modal.test.tsx.snap | 18 +- src/__snapshots__/QrCode.test.tsx.snap | 2 +- src/__snapshots__/Toast.test.tsx.snap | 2 +- .../ReactionToggleButton.test.tsx.snap | 2 +- .../MediaMuteAndSwitchButton.test.tsx.snap | 4 +- .../RaisedHandIndicator.test.tsx.snap | 12 +- .../GroupCallErrorBoundary.test.tsx.snap | 252 +++++++++--------- .../__snapshots__/InCallView.test.tsx.snap | 56 ++-- .../__snapshots__/LobbyView.test.tsx.snap | 102 +++---- .../DeveloperSettingsTab.test.tsx.snap | 38 +-- 11 files changed, 252 insertions(+), 252 deletions(-) diff --git a/src/__snapshots__/AppBar.test.tsx.snap b/src/__snapshots__/AppBar.test.tsx.snap index 48218948..99b322ac 100644 --- a/src/__snapshots__/AppBar.test.tsx.snap +++ b/src/__snapshots__/AppBar.test.tsx.snap @@ -3,12 +3,12 @@ exports[`AppBar > renders 1`] = `
@@ -46,12 +46,12 @@ exports[`AppBar > renders 1`] = ` exports[`AppBar > renders with title and subtitle 1`] = `

Title

Subtitle
diff --git a/src/__snapshots__/Modal.test.tsx.snap b/src/__snapshots__/Modal.test.tsx.snap index 648bdfd5..4753701e 100644 --- a/src/__snapshots__/Modal.test.tsx.snap +++ b/src/__snapshots__/Modal.test.tsx.snap @@ -3,7 +3,7 @@ exports[`the content is rendered when the modal is open 1`] = `