Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to vitest 3 #963

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"@ember/test-helpers": "^4.0.4"
}
}
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
2 changes: 1 addition & 1 deletion packages/build-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"rollup": "4.31.0",
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vitest": "2.1.8"
"vitest": "3.0.2"
},
"peerDependencies": {},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cdn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"prettier": "3.4.2",
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vitest": "2.1.8"
"vitest": "3.0.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"prettier": "3.4.2",
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vitest": "2.1.8"
"vitest": "3.0.2"
},
"peerDependenciesMeta": {
"blurhash": {
Expand Down
4 changes: 2 additions & 2 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@solidjs/testing-library": "0.8.10",
"@tsconfig/strictest": "2.0.5",
"@types/node": "22.10.7",
"@vitest/browser": "2.1.8",
"@vitest/browser": "3.0.2",
"babel-preset-solid": "1.9.3",
"concurrently": "9.1.2",
"eslint": "9.18.0",
Expand All @@ -72,6 +72,6 @@
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vite-plugin-solid": "2.11.0",
"vitest": "2.1.8"
"vitest": "3.0.2"
}
}
13 changes: 7 additions & 6 deletions packages/solid/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export default defineConfig(({ mode }) => {
browser: {
enabled: !testSSR,
provider: 'playwright',
name: 'chromium',
providerOptions: {
launch: {
channel: 'chrome',
instances: [
{
name: 'Chrome',
browser: 'chromium',
launch: { channel: 'chrome' },
},
},
],
},
watch: false,
isolate: !testSSR,
Expand All @@ -34,7 +35,6 @@ export default defineConfig(({ mode }) => {
SSR: testSSR ? '1' : '',
PROD: testSSR ? '1' : '',
},
environment: testSSR ? 'node' : 'jsdom',
transformMode: { web: [/\.[jt]sx$/] },
...(testSSR
? {
Expand All @@ -44,6 +44,7 @@ export default defineConfig(({ mode }) => {
include: ['tests/*.test.{ts,tsx}'],
exclude: ['tests/server.test.{ts,tsx}'],
}),
...(testSSR ? { environment: 'node' } : {}),
},
resolve: {
conditions: testSSR ? ['node'] : ['browser', 'development'],
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vite": "6.0.7",
"vitest": "2.1.8"
"vitest": "3.0.2"
},
"peerDependencies": {
"vite": "^5.2.0 || ^6.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/wc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@custom-elements-manifest/analyzer": "0.10.4",
"@open-wc/testing-helpers": "3.0.1",
"@vitest/browser": "2.1.8",
"@vitest/browser": "3.0.2",
"concurrently": "9.1.2",
"eslint": "9.18.0",
"eslint-config-prettier": "10.0.1",
Expand All @@ -58,7 +58,7 @@
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vite": "6.0.7",
"vitest": "2.1.8"
"vitest": "3.0.2"
},
"customElements": "custom-elements.json"
}
10 changes: 5 additions & 5 deletions packages/wc/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export default defineConfig({
browser: {
provider: 'playwright', // or 'webdriverio'
enabled: true,
name: 'chromium', // browser name is required
providerOptions: {
launch: {
channel: 'chrome',
instances: [
{
browser: 'chromium',
launch: { channel: 'chrome' },
},
},
],
},
},
});
2 changes: 1 addition & 1 deletion packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"style-loader": "4.0.0",
"typescript": "5.7.3",
"typescript-eslint": "8.20.0",
"vitest": "2.1.8",
"vitest": "3.0.2",
"webpack": "5.97.1"
},
"peerDependencies": {
Expand Down
16 changes: 16 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/dist/esm/index.mjs b/dist/esm/index.mjs
index e065926b3da86406660aba987cb8226af9f0f8fd..bca68dfff42867a904d1be10938240ae459a8612 100644
--- a/dist/esm/index.mjs
+++ b/dist/esm/index.mjs
@@ -102,10 +102,7 @@ function solidPlugin(options = {}) {
include: [...nestedDeps, ...solidPkgsConfig.optimizeDeps.include],
exclude: solidPkgsConfig.optimizeDeps.exclude
},
- ssr: solidPkgsConfig.ssr,
- ...(test.server ? {
- test
- } : {})
+ ssr: solidPkgsConfig.ssr
};
},
// @ts-ignore This hook only works in Vite 6
Loading
Loading