From 37e57c747a76e8746da546de88ebbe4cc6254d62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:58:23 +0000 Subject: [PATCH] chore(deps): update devdependency @nuxt/test-utils to v3.10.0 (main) (#25271) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- package.json | 2 +- pnpm-lock.yaml | 22 ++++++++++++--------- test/basic.test.ts | 48 ++++++++++++++++++++++++++++------------------ 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 06f8856687..3ba55628e5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "@codspeed/vitest-plugin": "2.3.1", "@nuxt/eslint-config": "0.2.0", - "@nuxt/test-utils": "3.9.0", + "@nuxt/test-utils": "3.10.0", "@nuxt/webpack-builder": "workspace:*", "@types/fs-extra": "11.0.4", "@types/node": "20.11.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f28e56ee5f..be4cfd98a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,8 +26,8 @@ importers: specifier: 0.2.0 version: 0.2.0(eslint@8.56.0) '@nuxt/test-utils': - specifier: 3.9.0 - version: 3.9.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14) + specifier: 3.10.0 + version: 3.10.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14) '@nuxt/webpack-builder': specifier: workspace:* version: link:packages/webpack @@ -2034,16 +2034,17 @@ packages: rc9: 2.1.1 std-env: 3.7.0 - /@nuxt/test-utils@3.9.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14): - resolution: {integrity: sha512-17qaU4vfFJWIaT4BJ/R6C2rIuvxaF5HaiRusXHhA/34SyiduNEhezIvIVqhWVkn33y5CNueduE0AykBEj1IgEA==} + /@nuxt/test-utils@3.10.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14): + resolution: {integrity: sha512-9ZKKrccCUyZP0P9/BdTNHWwTRvIbBnrmDvqvO0dQpTiUhgDVeO1vdG40o4e4olw7sbzUP51C8uA0OkRur/zBvQ==} engines: {node: ^14.18.0 || >=16.10.0} peerDependencies: + '@cucumber/cucumber': ^10.3.1 '@jest/globals': ^29.5.0 '@testing-library/vue': ^7.0.0 || ^8.0.1 '@vitest/ui': ^0.34.6 || ^1.0.0 '@vue/test-utils': ^2.4.2 h3: '*' - happy-dom: ^9.10.9 || ^10.0.0 || ^11.0.0 || ^12.0.0 + happy-dom: ^9.10.9 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 jsdom: ^22.0.0 || ^23.0.0 playwright-core: ^1.34.3 vite: 5.0.11 @@ -2051,6 +2052,8 @@ packages: vue: 3.4.14 vue-router: ^4.0.0 peerDependenciesMeta: + '@cucumber/cucumber': + optional: true '@jest/globals': optional: true '@testing-library/vue': @@ -2077,7 +2080,7 @@ packages: destr: 2.0.2 estree-walker: 3.0.3 execa: 8.0.1 - fake-indexeddb: 5.0.1 + fake-indexeddb: 5.0.2 get-port-please: 3.1.2 h3: 1.10.0 happy-dom: 13.1.4 @@ -5094,8 +5097,8 @@ packages: ufo: 1.3.2 dev: false - /fake-indexeddb@5.0.1: - resolution: {integrity: sha512-vxybH29Owtc6khV/Usy47B1g+eKwyhFiX8nwpCC4td320jvwrKQDH6vNtcJZgUzVxmfsSIlHzLKQzT76JMCO7A==} + /fake-indexeddb@5.0.2: + resolution: {integrity: sha512-cB507r5T3D55DfclY01GLkninZLfU7HXV/mhVRTnTRm5k2u+fY7Fof2dBkr80p5t7G7dlA/G5dI87QiMdPpMCQ==} engines: {node: '>=18'} dev: true @@ -9586,8 +9589,9 @@ packages: /vitest-environment-nuxt@1.0.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14): resolution: {integrity: sha512-AWMO9h4HdbaFdPWZw34gALFI8gbBiOpvfbyeZwHIPfh4kWg/TwElYHvYMQ61WPUlCGaS5LebfHkaI0WPyb//Iw==} dependencies: - '@nuxt/test-utils': 3.9.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14) + '@nuxt/test-utils': 3.10.0(@vue/test-utils@2.4.3)(h3@1.10.0)(happy-dom@13.1.4)(playwright-core@1.41.0)(vite@5.0.11)(vitest@1.1.1)(vue-router@4.2.5)(vue@3.4.14) transitivePeerDependencies: + - '@cucumber/cucumber' - '@jest/globals' - '@testing-library/vue' - '@vitest/ui' diff --git a/test/basic.test.ts b/test/basic.test.ts index 287717ce2b..63d904512c 100644 --- a/test/basic.test.ts +++ b/test/basic.test.ts @@ -1678,9 +1678,12 @@ describe.skipIf(isDev())('dynamic paths', () => { }) it('should allow setting base URL and build assets directory', async () => { - process.env.NUXT_APP_BUILD_ASSETS_DIR = '/_other/' - process.env.NUXT_APP_BASE_URL = '/foo/' - await startServer() + await startServer({ + env: { + NUXT_APP_BUILD_ASSETS_DIR: '/_other/', + NUXT_APP_BASE_URL: '/foo/', + } + }) const html = await $fetch('/foo/assets') for (const match of html.matchAll(/(href|src)="(.*?)"|url\(([^)]*?)\)/g)) { @@ -1695,9 +1698,11 @@ describe.skipIf(isDev())('dynamic paths', () => { }) it('should allow setting relative baseURL', async () => { - delete process.env.NUXT_APP_BUILD_ASSETS_DIR - process.env.NUXT_APP_BASE_URL = './' - await startServer() + await startServer({ + env: { + NUXT_APP_BASE_URL: './' + } + }) const html = await $fetch('/assets') for (const match of html.matchAll(/(href|src)="(.*?)"|url\(([^)]*?)\)/g)) { @@ -1713,19 +1718,25 @@ describe.skipIf(isDev())('dynamic paths', () => { }) it('should use baseURL when redirecting', async () => { - process.env.NUXT_APP_BUILD_ASSETS_DIR = '/_other/' - process.env.NUXT_APP_BASE_URL = '/foo/' - await startServer() + await startServer({ + env: { + NUXT_APP_BUILD_ASSETS_DIR: '/_other/', + NUXT_APP_BASE_URL: '/foo/', + } + }) const { headers } = await fetch('/foo/navigate-to/', { redirect: 'manual' }) expect(headers.get('location')).toEqual('/foo/') }) it('should allow setting CDN URL', async () => { - process.env.NUXT_APP_BASE_URL = '/foo/' - process.env.NUXT_APP_CDN_URL = 'https://example.com/' - process.env.NUXT_APP_BUILD_ASSETS_DIR = '/_cdn/' - await startServer() + await startServer({ + env: { + NUXT_APP_BASE_URL: '/foo/', + NUXT_APP_CDN_URL: 'https://example.com/', + NUXT_APP_BUILD_ASSETS_DIR: '/_cdn/' + } + }) const html = await $fetch('/foo/assets') for (const match of html.matchAll(/(href|src)="(.*?)"|url\(([^)]*?)\)/g)) { @@ -1740,9 +1751,6 @@ describe.skipIf(isDev())('dynamic paths', () => { }) it('restore server', async () => { - process.env.NUXT_APP_BASE_URL = undefined - process.env.NUXT_APP_CDN_URL = undefined - process.env.NUXT_APP_BUILD_ASSETS_DIR = undefined await startServer() }) }) @@ -2029,13 +2037,15 @@ describe('component islands', () => { }) it.skipIf(isDev())('should not render an error when having a baseURL', async () => { - process.env.NUXT_APP_BASE_URL = '/foo/' - await startServer() + await startServer({ + env: { + NUXT_APP_BASE_URL: '/foo/' + } + }) const result = await fetch('/foo/islands') expect(result.status).toBe(200) - process.env.NUXT_APP_BASE_URL = undefined await startServer() }) })