diff --git a/test-storybooks/portable-stories-kitchen-sink/nextjs/jest.config.js b/test-storybooks/portable-stories-kitchen-sink/nextjs/jest.config.js
index 3867a50e7bc7..f427b4763dd6 100644
--- a/test-storybooks/portable-stories-kitchen-sink/nextjs/jest.config.js
+++ b/test-storybooks/portable-stories-kitchen-sink/nextjs/jest.config.js
@@ -9,7 +9,7 @@ const createJestConfig = nextJest({
/** @type {import('jest').Config} */
const customJestConfig = {
coverageProvider: 'v8',
- testEnvironment: 'jsdom',
+ testEnvironment: '@happy-dom/jest-environment',
// Add more setup options before each test is run
setupFilesAfterEnv: ['./jest.setup.ts'],
moduleNameMapper: {
diff --git a/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json b/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json
index 9e9b8e0285f8..69722cabd5db 100644
--- a/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json
+++ b/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json
@@ -84,6 +84,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
+ "@happy-dom/jest-environment": "^15.11.7",
"@jest/globals": "^29.7.0",
"@storybook/addon-actions": "^8.0.0",
"@storybook/addon-essentials": "^8.0.0",
@@ -101,11 +102,10 @@
"eslint": "^8.56.0",
"eslint-plugin-storybook": "^0.6.15",
"jest": "^29.7.0",
- "jest-environment-jsdom": "^29.7.0",
"storybook": "^8.0.0",
"typescript": "^5.2.2"
},
"maintainer_please_read_this": {
"_": "we use file protocol to make this setup close to real life scenarios as well as avoid issues with duplicated React instances. When you recompile the SB packages, you need to rerun install."
}
-}
\ No newline at end of file
+}
diff --git a/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/__snapshots__/portable-stories.test.tsx.snap b/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/__snapshots__/portable-stories.test.tsx.snap
index e65b31476609..677e011bb38c 100644
--- a/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/__snapshots__/portable-stories.test.tsx.snap
+++ b/test-storybooks/portable-stories-kitchen-sink/nextjs/stories/__snapshots__/portable-stories.test.tsx.snap
@@ -158,16 +158,16 @@ exports[`renders imageLegacyStories stories renders BlurredAbsolutePlaceholder 1
Global Decorator
@@ -193,16 +193,16 @@ exports[`renders imageLegacyStories stories renders BlurredPlaceholder 1`] = `
Global Decorator
@@ -228,16 +228,16 @@ exports[`renders imageLegacyStories stories renders Default 1`] = `
Global Decorator
diff --git a/test-storybooks/portable-stories-kitchen-sink/svelte/package.json b/test-storybooks/portable-stories-kitchen-sink/svelte/package.json
index 3ade95a00417..ad5699a549c7 100644
--- a/test-storybooks/portable-stories-kitchen-sink/svelte/package.json
+++ b/test-storybooks/portable-stories-kitchen-sink/svelte/package.json
@@ -92,7 +92,7 @@
"@tsconfig/svelte": "^5.0.2",
"@types/node": "^22",
"cypress": "^13.6.6",
- "jsdom": "^24.0.0",
+ "happy-dom": "^15.11.7",
"storybook": "8.0.0-rc.2",
"svelte": "^4.2.11",
"svelte-check": "^3.6.4",
@@ -101,4 +101,4 @@
"vite": "^5.1.4",
"vitest": "^1.6.0"
}
-}
\ No newline at end of file
+}
diff --git a/test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts b/test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts
index 161976e6ed91..6e2bef8799d2 100644
--- a/test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts
+++ b/test-storybooks/portable-stories-kitchen-sink/svelte/vite.config.ts
@@ -1,11 +1,10 @@
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/config'
import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
- //@ts-ignore
test: {
- environment: 'jsdom'
+ environment: 'happy-dom'
}
})