test: try to improve dev test stability (#31218)

Co-authored-by: Pooya Parsa <pooya@pi0.io>
This commit is contained in:
Daniel Roe 2025-03-06 10:54:02 +00:00 committed by GitHub
parent 83f3fc47ca
commit d527a29af5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 106 additions and 80 deletions

View File

@ -22,8 +22,6 @@ env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
# TODO: https://github.com/nitrojs/nitro/pull/3152
NITRO_NO_UNIX_SOCKET: 1
# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
@ -312,6 +310,7 @@ jobs:
TEST_CONTEXT: ${{ matrix.context }}
TEST_PAYLOAD: ${{ matrix.payload }}
SKIP_BUNDLE_SIZE: true
NITRO_NO_UNIX_SOCKET: ${{ matrix.env == 'dev' && '1' || '' }}
- uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
if: github.event_name != 'push' && matrix.env == 'built' && matrix.builder == 'vite' && matrix.context == 'default' && matrix.os == 'ubuntu-latest' && matrix.manifest == 'manifest-on'

View File

@ -82,7 +82,7 @@
"@unhead/vue": "2.0.0-rc.1",
"@vitest/coverage-v8": "3.0.7",
"@vue/test-utils": "2.4.6",
"acorn": "8.14.0",
"acorn": "8.14.1",
"autoprefixer": "10.4.20",
"case-police": "1.0.0",
"changelogen": "0.6.1",
@ -96,14 +96,14 @@
"eslint-typegen": "2.0.0",
"estree-walker": "3.0.3",
"h3": "1.15.1",
"happy-dom": "17.1.9",
"happy-dom": "17.2.2",
"installed-check": "9.3.0",
"jiti": "2.4.2",
"knip": "5.45.0",
"magic-string": "0.30.17",
"markdownlint-cli": "0.44.0",
"memfs": "4.17.0",
"nitropack": "2.11.0",
"nitropack": "2.11.2",
"nuxt": "workspace:*",
"nuxt-content-twoslash": "0.1.2",
"ofetch": "1.4.1",

View File

@ -56,7 +56,7 @@
"@types/lodash-es": "4.17.12",
"@types/semver": "7.5.8",
"lodash-es": "4.17.21",
"nitropack": "2.11.0",
"nitropack": "2.11.2",
"unbuild": "latest",
"vite": "6.2.0",
"vitest": "3.0.7",

View File

@ -106,7 +106,7 @@
"magic-string": "^0.30.17",
"mlly": "^1.7.4",
"nanotar": "^0.2.0",
"nitropack": "^2.11.0",
"nitropack": "^2.11.2",
"nypm": "^0.6.0",
"ofetch": "^1.4.1",
"ohash": "^2.0.11",

View File

@ -56,7 +56,7 @@
"hookable": "5.5.3",
"ignore": "7.0.3",
"mini-css-extract-plugin": "2.9.2",
"nitropack": "2.11.0",
"nitropack": "2.11.2",
"ofetch": "1.4.1",
"pkg-types": "2.1.0",
"postcss": "8.5.3",

View File

@ -553,6 +553,7 @@ export default defineResolvers({
'**/*.{spec,test}.{js,cts,mts,ts,jsx,tsx}', // ignore tests
'**/*.d.{cts,mts,ts}', // ignore type declarations
'**/.{pnpm-store,vercel,netlify,output,git,cache,data}',
'**/*.sock',
relative(rootDir, analyzeDir),
relative(rootDir, buildDir),
])

View File

@ -46,7 +46,7 @@ importers:
version: 7.26.5
'@codspeed/vitest-plugin':
specifier: 4.0.0
version: 4.0.0(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
version: 4.0.0(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
'@nuxt/cli':
specifier: 3.22.4
version: 3.22.4(magicast@0.3.5)
@ -61,7 +61,7 @@ importers:
version: link:packages/rspack
'@nuxt/test-utils':
specifier: 3.17.1
version: 3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
version: 3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
'@nuxt/webpack-builder':
specifier: workspace:*
version: link:packages/webpack
@ -85,13 +85,13 @@ importers:
version: 2.0.0-rc.1(vue@3.5.13(typescript@5.8.2))
'@vitest/coverage-v8':
specifier: 3.0.7
version: 3.0.7(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
version: 3.0.7(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
'@vue/test-utils':
specifier: 2.4.6
version: 2.4.6
acorn:
specifier: 8.14.0
version: 8.14.0
specifier: 8.14.1
version: 8.14.1
autoprefixer:
specifier: 10.4.20
version: 10.4.20(postcss@8.5.3)
@ -132,8 +132,8 @@ importers:
specifier: 1.15.1
version: 1.15.1
happy-dom:
specifier: 17.1.9
version: 17.1.9
specifier: 17.2.2
version: 17.2.2
installed-check:
specifier: 9.3.0
version: 9.3.0
@ -153,8 +153,8 @@ importers:
specifier: 4.17.0
version: 4.17.0
nitropack:
specifier: 2.11.0
version: 2.11.0(typescript@5.8.2)
specifier: 2.11.2
version: 2.11.2(typescript@5.8.2)
nuxt:
specifier: workspace:*
version: link:packages/nuxt
@ -205,10 +205,10 @@ importers:
version: 3.5.0(typescript@5.8.2)(vue-tsc@2.2.8(typescript@5.8.2))(vue@3.5.13(typescript@5.8.2))
vitest:
specifier: 3.0.7
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest-environment-nuxt:
specifier: 1.0.1
version: 1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
version: 1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
vue:
specifier: 3.5.13
version: 3.5.13(typescript@5.8.2)
@ -304,8 +304,8 @@ importers:
specifier: 4.17.21
version: 4.17.21
nitropack:
specifier: 2.11.0
version: 2.11.0(typescript@5.8.2)
specifier: 2.11.2
version: 2.11.2(typescript@5.8.2)
unbuild:
specifier: latest
version: 3.5.0(typescript@5.8.2)(vue-tsc@2.2.8(typescript@5.8.2))(vue@3.5.13(typescript@5.8.2))
@ -314,7 +314,7 @@ importers:
version: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest:
specifier: 3.0.7
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
webpack:
specifier: 5.98.0
version: 5.98.0
@ -424,8 +424,8 @@ importers:
specifier: ^0.2.0
version: 0.2.0
nitropack:
specifier: ^2.11.0
version: 2.11.0(typescript@5.8.2)
specifier: ^2.11.2
version: 2.11.2(typescript@5.8.2)
nypm:
specifier: ^0.6.0
version: 0.6.0
@ -537,7 +537,7 @@ importers:
version: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest:
specifier: 3.0.7
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
packages/rspack:
dependencies:
@ -757,8 +757,8 @@ importers:
specifier: 2.9.2
version: 2.9.2(webpack@5.98.0(esbuild@0.25.0))
nitropack:
specifier: 2.11.0
version: 2.11.0(typescript@5.8.2)
specifier: 2.11.2
version: 2.11.2(typescript@5.8.2)
ofetch:
specifier: 1.4.1
version: 1.4.1
@ -824,7 +824,7 @@ importers:
version: 0.2.0
html-validate:
specifier: 9.4.1
version: 9.4.1(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
version: 9.4.1(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
htmlnano:
specifier: 2.1.1
version: 2.1.1(cssnano@7.0.6(postcss@8.5.3))(postcss@8.5.3)(relateurl@0.2.7)(svgo@3.3.2)(terser@5.32.0)(typescript@5.8.2)
@ -1164,7 +1164,7 @@ importers:
version: 0.12.0(vue-router@4.5.0(vue@3.5.13(typescript@5.8.2)))(vue@3.5.13(typescript@5.8.2))
vitest:
specifier: latest
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
version: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vue:
specifier: 3.5.13
version: 3.5.13(typescript@5.8.2)
@ -3295,6 +3295,11 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
acorn@8.14.1:
resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==}
engines: {node: '>=0.4.0'}
hasBin: true
agent-base@7.1.1:
resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==}
engines: {node: '>= 14'}
@ -4409,6 +4414,9 @@ packages:
exsolve@1.0.1:
resolution: {integrity: sha512-Smf0iQtkQVJLaph8r/qS8C8SWfQkaq9Q/dFcD44MLbJj6DNhlWefVuaS21SjfqOsBbjVlKtbCj6L9ekXK6EZUg==}
exsolve@1.0.2:
resolution: {integrity: sha512-ZEcIMbthn2zeX4/wD/DLxDUjuCltHXT8Htvm/JFlTkdYgWh2+HGppgwwNUnIVxzxP7yJOPtuBAec0dLx6lVY8w==}
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
@ -4675,8 +4683,8 @@ packages:
h3@1.15.1:
resolution: {integrity: sha512-+ORaOBttdUm1E2Uu/obAyCguiI7MbBvsLTndc3gyK3zU+SYLoZXlyCP9Xgy0gikkGufFLTZXCXD6+4BsufnmHA==}
happy-dom@17.1.9:
resolution: {integrity: sha512-HL26ajjMVe/wr3xlzjF0sCPCiAKaZJcIRFZHmG4yKHRJp4YAkHPG5X6GfWxCeDTpOmuHhNiOyNKUoZjjnm0tjw==}
happy-dom@17.2.2:
resolution: {integrity: sha512-3I1/CrNi780sdOhuhUnFtgTWhloSc3quSZwsylI41jycx8o97M6Y4aQAu0phSexGusT7+59BxATh4L4xiY0HcA==}
engines: {node: '>=18.0.0'}
has-bigints@1.0.2:
@ -5748,8 +5756,8 @@ packages:
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
nitropack@2.11.0:
resolution: {integrity: sha512-E8HDHg83qA/qqHUFGAioWE0FQsa8lK6J9CP8L5JfPpGeWBpNj9B5r7mDV68L39DrpNczQQ9h/pjo8Fs6IxaatQ==}
nitropack@2.11.2:
resolution: {integrity: sha512-NyXw88hkrigXYo0iDodEbWdLyv8iF69LAj63eS+FDLg8+IDEKv1y58eMKmzk8vW/hwHoi2aimqHTfsZbqFAWrg==}
engines: {node: ^16.11.0 || >=17.0.0}
hasBin: true
peerDependencies:
@ -8169,11 +8177,11 @@ snapshots:
transitivePeerDependencies:
- debug
'@codspeed/vitest-plugin@4.0.0(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))':
'@codspeed/vitest-plugin@4.0.0(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))':
dependencies:
'@codspeed/core': 4.0.0
vite: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- debug
@ -8860,7 +8868,7 @@ snapshots:
rc9: 2.1.2
std-env: 3.8.1
'@nuxt/test-utils@3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)':
'@nuxt/test-utils@3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)':
dependencies:
'@nuxt/kit': link:packages/kit
'@nuxt/schema': link:packages/schema
@ -8886,14 +8894,14 @@ snapshots:
unenv: 1.10.0
unplugin: 2.2.0
vite: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest-environment-nuxt: 1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
vitest-environment-nuxt: 1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
vue: 3.5.13(typescript@5.8.2)
optionalDependencies:
'@testing-library/vue': 8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2))
'@vue/test-utils': 2.4.6
happy-dom: 17.1.9
happy-dom: 17.2.2
playwright-core: 1.50.1
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- '@types/node'
- jiti
@ -9896,8 +9904,8 @@ snapshots:
dependencies:
'@mapbox/node-pre-gyp': 2.0.0
'@rollup/pluginutils': 5.1.4(rollup@4.34.9)
acorn: 8.14.0
acorn-import-attributes: 1.9.5(acorn@8.14.0)
acorn: 8.14.1
acorn-import-attributes: 1.9.5(acorn@8.14.1)
async-sema: 3.1.1
bindings: 1.5.0
estree-walker: 2.0.2
@ -9926,7 +9934,7 @@ snapshots:
vite: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vue: 3.5.13(typescript@5.8.2)
'@vitest/coverage-v8@3.0.7(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))':
'@vitest/coverage-v8@3.0.7(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))':
dependencies:
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 1.0.2
@ -9940,7 +9948,7 @@ snapshots:
std-env: 3.8.1
test-exclude: 7.0.1
tinyrainbow: 2.0.0
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
transitivePeerDependencies:
- supports-color
@ -10274,22 +10282,24 @@ snapshots:
dependencies:
event-target-shim: 5.0.1
acorn-import-attributes@1.9.5(acorn@8.14.0):
acorn-import-attributes@1.9.5(acorn@8.14.1):
dependencies:
acorn: 8.14.0
acorn: 8.14.1
acorn-jsx@5.3.2(acorn@8.14.0):
acorn-jsx@5.3.2(acorn@8.14.1):
dependencies:
acorn: 8.14.0
acorn: 8.14.1
acorn-walk@8.3.4:
dependencies:
acorn: 8.14.0
acorn: 8.14.1
acorn@7.4.1: {}
acorn@8.14.0: {}
acorn@8.14.1: {}
agent-base@7.1.1(supports-color@9.4.0):
dependencies:
debug: 4.4.0(supports-color@9.4.0)
@ -11489,14 +11499,14 @@ snapshots:
espree@10.3.0:
dependencies:
acorn: 8.14.0
acorn-jsx: 5.3.2(acorn@8.14.0)
acorn: 8.14.1
acorn-jsx: 5.3.2(acorn@8.14.1)
eslint-visitor-keys: 4.2.0
espree@9.6.1:
dependencies:
acorn: 8.14.0
acorn-jsx: 5.3.2(acorn@8.14.0)
acorn: 8.14.1
acorn-jsx: 5.3.2(acorn@8.14.1)
eslint-visitor-keys: 3.4.3
esquery@1.6.0:
@ -11556,6 +11566,8 @@ snapshots:
exsolve@1.0.1: {}
exsolve@1.0.2: {}
extend@3.0.2: {}
externality@1.0.2:
@ -11836,7 +11848,7 @@ snapshots:
ufo: 1.5.4
uncrypto: 0.1.3
happy-dom@17.1.9:
happy-dom@17.2.2:
dependencies:
webidl-conversions: 7.0.0
whatwg-mimetype: 3.0.0
@ -12023,7 +12035,7 @@ snapshots:
html-tags@3.3.1: {}
html-validate@9.4.1(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)):
html-validate@9.4.1(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)):
dependencies:
'@html-validate/stylish': 4.2.0
'@sidvind/better-ajv-errors': 3.0.1(ajv@8.17.1)
@ -12034,7 +12046,7 @@ snapshots:
prompts: 2.4.2
semver: 7.7.1
optionalDependencies:
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
vitest: 3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0)
html-void-elements@3.0.0: {}
@ -13149,7 +13161,7 @@ snapshots:
neo-async@2.6.2: {}
nitropack@2.11.0(typescript@5.8.2):
nitropack@2.11.2(typescript@5.8.2):
dependencies:
'@cloudflare/kv-asset-handler': 0.3.4
'@netlify/functions': 3.0.0
@ -13179,7 +13191,7 @@ snapshots:
esbuild: 0.25.0
escape-string-regexp: 5.0.0
etag: 1.8.1
exsolve: 1.0.1
exsolve: 1.0.2
fs-extra: 11.3.0
globby: 14.1.0
gzip-size: 7.0.0
@ -14704,7 +14716,7 @@ snapshots:
terser@5.32.0:
dependencies:
'@jridgewell/source-map': 0.3.6
acorn: 8.14.0
acorn: 8.14.1
commander: 2.20.3
source-map-support: 0.5.21
@ -15037,7 +15049,7 @@ snapshots:
unplugin@1.16.1:
dependencies:
acorn: 8.14.0
acorn: 8.14.1
webpack-virtual-modules: 0.6.2
unplugin@2.2.0:
@ -15238,9 +15250,9 @@ snapshots:
tsx: 4.19.2
yaml: 2.7.0
vitest-environment-nuxt@1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0):
vitest-environment-nuxt@1.0.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0):
dependencies:
'@nuxt/test-utils': 3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.1.9)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
'@nuxt/test-utils': 3.17.1(@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.2)))(@types/node@22.13.9)(@vue/test-utils@2.4.6)(happy-dom@17.2.2)(jiti@2.4.2)(magicast@0.3.5)(playwright-core@1.50.1)(terser@5.32.0)(tsx@4.19.2)(typescript@5.8.2)(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)
transitivePeerDependencies:
- '@cucumber/cucumber'
- '@jest/globals'
@ -15266,7 +15278,7 @@ snapshots:
- vitest
- yaml
vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.1.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0):
vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(happy-dom@17.2.2)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0):
dependencies:
'@vitest/expect': 3.0.7
'@vitest/mocker': 3.0.7(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(sass@1.78.0)(terser@5.32.0)(tsx@4.19.2)(yaml@2.7.0))
@ -15291,7 +15303,7 @@ snapshots:
optionalDependencies:
'@types/debug': 4.1.12
'@types/node': 22.13.9
happy-dom: 17.1.9
happy-dom: 17.2.2
transitivePeerDependencies:
- jiti
- less

View File

@ -76,7 +76,6 @@ export default defineNuxtConfig({
testConfig: 123,
},
},
buildDir: process.env.NITRO_BUILD_DIR,
builder: process.env.TEST_BUILDER as 'webpack' | 'rspack' | 'vite' ?? 'vite',
routeRules: {
'/param': {

View File

@ -19,15 +19,14 @@ if (process.env.TEST_ENV !== 'built' && !isWindows) {
browser: true,
setupTimeout: (isWindows ? 360 : 120) * 1000,
nuxtConfig: {
buildDir: join(fixturePath, '.nuxt', 'test', Math.random().toString(36).slice(2, 8)),
builder: isWebpack ? 'webpack' : 'vite',
buildDir: process.env.NITRO_BUILD_DIR,
nitro: { output: { dir: process.env.NITRO_OUTPUT_DIR } },
},
})
const indexVue = await fsp.readFile(join(fixturePath, 'pages/index.vue'), 'utf8')
describe('hmr', () => {
describe('hmr', { sequential: true }, () => {
beforeAll(async () => {
await expectWithPolling(() => $fetch<string>('/').then(r => r.includes('Home page')).catch(() => null), true)
})
@ -66,7 +65,7 @@ if (process.env.TEST_ENV !== 'built' && !isWindows) {
await page.close()
})
it('should detect new routes', async () => {
it('should detect new routes', { timeout: 60000 }, async () => {
const res = await fetch('/some-404')
expect(res.status).toBe(404)
@ -75,7 +74,7 @@ if (process.env.TEST_ENV !== 'built' && !isWindows) {
await expectWithPolling(() => $fetch<string>('/some-404').then(r => r.includes('Home page')).catch(() => null), true)
})
it('should hot reload route rules', async () => {
it('should hot reload route rules', { timeout: 60000 }, async () => {
await expectWithPolling(() => fetch('/route-rules').then(r => r.headers.get('x-extend')).catch(() => null), 'added in routeRules')
// write new page route
@ -146,7 +145,7 @@ if (process.env.TEST_ENV !== 'built' && !isWindows) {
})
it.skipIf(isWebpack)('should HMR routes', { timeout: 60_000 }, async () => {
const { page, pageErrors, consoleLogs } = await renderPage('/routes')
const { page, pageErrors, consoleLogs } = await renderPage('/routes', { retries: 5 })
await fsp.writeFile(join(fixturePath, 'pages/routes/non-existent.vue'), `<template><div data-testid="contents">A new route!</div></template>`)

View File

@ -2,18 +2,23 @@ import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { $fetch, createPage, setup } from '@nuxt/test-utils/e2e'
import { isWindows } from 'std-env'
import { join } from 'pathe'
import { expectNoClientErrors } from './utils'
const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
const isDev = process.env.TEST_ENV === 'dev'
const fixtureDir = fileURLToPath(new URL('./fixtures/runtime-compiler', import.meta.url))
await setup({
rootDir: fileURLToPath(new URL('./fixtures/runtime-compiler', import.meta.url)),
dev: process.env.TEST_ENV === 'dev',
rootDir: fixtureDir,
dev: isDev,
server: true,
browser: true,
setupTimeout: (isWindows ? 360 : 120) * 1000,
nuxtConfig: {
builder: isWebpack ? 'webpack' : 'vite',
buildDir: isDev ? join(fixtureDir, '.nuxt', 'test', Math.random().toString(36).slice(2, 8)) : undefined,
},
})

View File

@ -2,20 +2,23 @@ import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { isWindows } from 'std-env'
import { setup } from '@nuxt/test-utils/e2e'
import { join } from 'pathe'
import { renderPage } from './utils'
const isWebpack = process.env.TEST_BUILDER === 'webpack' || process.env.TEST_BUILDER === 'rspack'
const isDev = process.env.TEST_ENV === 'dev'
const fixtureDir = fileURLToPath(new URL('./fixtures/suspense', import.meta.url))
await setup({
rootDir: fileURLToPath(new URL('./fixtures/suspense', import.meta.url)),
dev: process.env.TEST_ENV === 'dev',
rootDir: fixtureDir,
dev: isDev,
server: true,
browser: true,
setupTimeout: (isWindows ? 360 : 120) * 1000,
nuxtConfig: {
builder: isWebpack ? 'webpack' : 'vite',
buildDir: process.env.NITRO_BUILD_DIR,
nitro: { output: { dir: process.env.NITRO_OUTPUT_DIR } },
buildDir: isDev ? join(fixtureDir, '.nuxt', 'test', Math.random().toString(36).slice(2, 8)) : undefined,
},
})

View File

@ -8,7 +8,7 @@ import { getBrowser, url, useTestContext } from '@nuxt/test-utils/e2e'
export const isRenderingJson = process.env.TEST_PAYLOAD !== 'js'
export async function renderPage (path = '/') {
export async function renderPage (path = '/', opts?: { retries?: number }) {
const ctx = useTestContext()
if (!ctx.options.browser) {
throw new Error('`renderPage` require `options.browser` to be set')
@ -38,7 +38,7 @@ export async function renderPage (path = '/') {
})
if (path) {
await gotoPath(page, path)
await gotoPath(page, path, opts?.retries)
}
return {
@ -71,8 +71,16 @@ export function expectNoErrorsOrWarnings (consoleLogs: Array<{ type: string, tex
expect(consoleLogWarnings).toEqual([])
}
export async function gotoPath (page: Page, path: string) {
await page.goto(url(path))
export async function gotoPath (page: Page, path: string, retries = 0) {
for (let retry = 0; retry <= retries; retry++) {
try {
await page.goto(url(path), { timeout: 3000 })
} catch (error) {
if (retry === retries) {
throw error
}
}
}
await page.waitForFunction(path => window.useNuxtApp?.()._route.fullPath === path && !window.useNuxtApp?.().isHydrating, path)
}