Skip to content

Commit 69ee79f

Browse files
dcrjodleclaude
andcommitted
Add test environment configuration for DiffView widget
Add happy-dom test environment and vitest config to enable tests to run with DOM APIs (window.matchMedia) available. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 3b97f49 commit 69ee79f

3 files changed

Lines changed: 82 additions & 19 deletions

File tree

src/widgets/Ivy.Widgets.DiffView/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@types/react": "19.2.8",
1818
"@types/react-dom": "19.2.3",
1919
"autoprefixer": "10.4.23",
20+
"happy-dom": "20.8.9",
2021
"postcss": "8.5.10",
2122
"tailwindcss": "3.4.19",
2223
"typescript": "5.9.3",

src/widgets/Ivy.Widgets.DiffView/frontend/pnpm-lock.yaml

Lines changed: 78 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/widgets/Ivy.Widgets.DiffView/frontend/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ export default defineConfig({
3838
sourcemap: true,
3939
cssCodeSplit: false,
4040
},
41+
test: {
42+
environment: "happy-dom",
43+
},
4144
});

0 commit comments

Comments
 (0)