From 51aebf9c840ddc9f51da3d4736c61cb97275d5f4 Mon Sep 17 00:00:00 2001 From: Jessica Sachs Date: Fri, 2 May 2025 17:56:38 -0400 Subject: [PATCH 1/4] fix: support Vitest Browser mode --- examples/app-vitest-browser/app.vue | 6 + .../components/MyCounter.vue | 23 + examples/app-vitest-browser/nuxt.config.ts | 8 + examples/app-vitest-browser/package.json | 22 + .../app-vitest-browser/test/component.test.ts | 24 + examples/app-vitest-browser/tsconfig.json | 3 + examples/app-vitest-browser/vitest.config.ts | 12 + pnpm-lock.yaml | 434 +++++++++++++++++- src/config.ts | 9 +- 9 files changed, 530 insertions(+), 11 deletions(-) create mode 100644 examples/app-vitest-browser/app.vue create mode 100644 examples/app-vitest-browser/components/MyCounter.vue create mode 100644 examples/app-vitest-browser/nuxt.config.ts create mode 100644 examples/app-vitest-browser/package.json create mode 100644 examples/app-vitest-browser/test/component.test.ts create mode 100644 examples/app-vitest-browser/tsconfig.json create mode 100644 examples/app-vitest-browser/vitest.config.ts diff --git a/examples/app-vitest-browser/app.vue b/examples/app-vitest-browser/app.vue new file mode 100644 index 000000000..1214e5b39 --- /dev/null +++ b/examples/app-vitest-browser/app.vue @@ -0,0 +1,6 @@ + diff --git a/examples/app-vitest-browser/components/MyCounter.vue b/examples/app-vitest-browser/components/MyCounter.vue new file mode 100644 index 000000000..c4fd2c64a --- /dev/null +++ b/examples/app-vitest-browser/components/MyCounter.vue @@ -0,0 +1,23 @@ + + + diff --git a/examples/app-vitest-browser/nuxt.config.ts b/examples/app-vitest-browser/nuxt.config.ts new file mode 100644 index 000000000..42d1bde86 --- /dev/null +++ b/examples/app-vitest-browser/nuxt.config.ts @@ -0,0 +1,8 @@ +// https://nuxt.com/docs/api/configuration/nuxt-config +export default defineNuxtConfig({ + devtools: { enabled: true }, + app: { + rootId: 'nuxt-test', + }, + compatibilityDate: '2024-04-03', +}) diff --git a/examples/app-vitest-browser/package.json b/examples/app-vitest-browser/package.json new file mode 100644 index 000000000..2fec84afc --- /dev/null +++ b/examples/app-vitest-browser/package.json @@ -0,0 +1,22 @@ +{ + "name": "example-app-vitest-browser", + "private": true, + "type": "module", + "scripts": { + "build": "nuxt build", + "dev": "nuxt dev", + "generate": "nuxt generate", + "preview": "nuxt preview", + "postinstall": "nuxt prepare", + "test": "vitest" + }, + "devDependencies": { + "@nuxt/test-utils": "latest", + "@vitest/browser": "3.1.2", + "@vue/test-utils": "^2.4.6", + "nuxt": "^3.17.1", + "typescript": "5.8.3", + "vitest": "3.1.2", + "vitest-browser-vue": "^0.2.0" + } +} diff --git a/examples/app-vitest-browser/test/component.test.ts b/examples/app-vitest-browser/test/component.test.ts new file mode 100644 index 000000000..064187b3f --- /dev/null +++ b/examples/app-vitest-browser/test/component.test.ts @@ -0,0 +1,24 @@ +import { describe, it, expect } from 'vitest' +import { render } from 'vitest-browser-vue' +import { MyCounter } from '#components' + +describe('Component (MyCounter)', () => { + it('renders', () => { + const { getByText } = render(MyCounter) + expect(getByText('Count: 0')).toBeInTheDocument() + }) + + it('can be interacted with (increment)', async () => { + const { getByText } = render(MyCounter) + const incrementButton = getByText('Increment') + await incrementButton.click() + expect(getByText('Count: 1')).toBeInTheDocument() + }) + + it('can be interacted with (decrement)', async () => { + const { getByText } = render(MyCounter) + const decrementButton = getByText('Decrement') + await decrementButton.click() + expect(getByText('Count: -1')).toBeInTheDocument() + }) +}) diff --git a/examples/app-vitest-browser/tsconfig.json b/examples/app-vitest-browser/tsconfig.json new file mode 100644 index 000000000..b55ac8e40 --- /dev/null +++ b/examples/app-vitest-browser/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "./.nuxt/tsconfig.json" +} diff --git a/examples/app-vitest-browser/vitest.config.ts b/examples/app-vitest-browser/vitest.config.ts new file mode 100644 index 000000000..0b98c3a9e --- /dev/null +++ b/examples/app-vitest-browser/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineVitestConfig } from '@nuxt/test-utils/config' + +export default defineVitestConfig({ + test: { + browser: { + enabled: true, + provider: 'playwright', + instances: [{ browser: 'chromium' }], + }, + setupFiles: ['vitest-browser-vue'], + }, +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ded83385e..8b103379f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -185,7 +185,7 @@ importers: version: 5.0.0 vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) vue-router: specifier: 4.5.1 version: 4.5.1(vue@3.5.13(typescript@5.8.3)) @@ -295,7 +295,31 @@ importers: version: 5.8.3 vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) + + examples/app-vitest-browser: + devDependencies: + '@nuxt/test-utils': + specifier: workspace:* + version: link:../.. + '@vitest/browser': + specifier: 3.1.2 + version: 3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2) + '@vue/test-utils': + specifier: ^2.4.6 + version: 2.4.6 + nuxt: + specifier: ^3.17.1 + version: 3.17.1(@netlify/blobs@8.2.0)(@parcel/watcher@2.4.1)(@types/node@22.15.3)(better-sqlite3@11.9.1)(db0@0.3.2(better-sqlite3@11.9.1))(encoding@0.1.13)(eslint@9.25.1(jiti@2.4.2))(idb-keyval@6.2.1)(ioredis@5.6.1)(magicast@0.3.5)(rollup@4.40.1)(terser@5.24.0)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vue-tsc@2.2.10(typescript@5.8.3))(yaml@2.7.1) + typescript: + specifier: 5.8.3 + version: 5.8.3 + vitest: + specifier: 3.1.2 + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) + vitest-browser-vue: + specifier: ^0.2.0 + version: 0.2.0(@vitest/browser@3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2))(vitest@3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)) examples/app-vitest-full: dependencies: @@ -326,7 +350,7 @@ importers: version: 5.8.3 vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) vue-tsc: specifier: 2.2.10 version: 2.2.10(typescript@5.8.3) @@ -344,7 +368,7 @@ importers: version: 3.17.1(@netlify/blobs@8.2.0)(@parcel/watcher@2.4.1)(@types/node@22.15.3)(better-sqlite3@11.9.1)(db0@0.3.2(better-sqlite3@11.9.1))(encoding@0.1.13)(eslint@9.25.1(jiti@2.4.2))(idb-keyval@6.2.1)(ioredis@5.6.1)(magicast@0.3.5)(rollup@4.40.1)(terser@5.24.0)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vue-tsc@2.2.10(typescript@5.8.3))(yaml@2.7.1) vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) examples/i18n: devDependencies: @@ -359,7 +383,7 @@ importers: version: 3.17.1(@netlify/blobs@8.2.0)(@parcel/watcher@2.4.1)(@types/node@22.15.3)(better-sqlite3@11.9.1)(db0@0.3.2(better-sqlite3@11.9.1))(encoding@0.1.13)(eslint@9.25.1(jiti@2.4.2))(idb-keyval@6.2.1)(ioredis@5.6.1)(magicast@0.3.5)(rollup@4.40.1)(terser@5.24.0)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vue-tsc@2.2.10(typescript@5.8.3))(yaml@2.7.1) vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) examples/module: dependencies: @@ -378,7 +402,7 @@ importers: version: 3.17.1(@netlify/blobs@8.2.0)(@parcel/watcher@2.4.1)(@types/node@22.15.3)(better-sqlite3@11.9.1)(db0@0.3.2(better-sqlite3@11.9.1))(encoding@0.1.13)(eslint@9.25.1(jiti@2.4.2))(idb-keyval@6.2.1)(ioredis@5.6.1)(magicast@0.3.5)(rollup@4.40.1)(terser@5.24.0)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vue-tsc@2.2.10(typescript@5.8.3))(yaml@2.7.1) vitest: specifier: 3.1.2 - version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1) + version: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) examples/module/playground: dependencies: @@ -625,6 +649,15 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@bundled-es-modules/cookie@2.0.1': + resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} + + '@bundled-es-modules/statuses@1.0.1': + resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + + '@bundled-es-modules/tough-cookie@0.1.6': + resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} + '@clack/core@0.4.1': resolution: {integrity: sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==} @@ -1424,6 +1457,37 @@ packages: resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} engines: {node: '>=18.18'} + '@inquirer/confirm@5.1.9': + resolution: {integrity: sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@10.1.10': + resolution: {integrity: sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@1.0.11': + resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} + engines: {node: '>=18'} + + '@inquirer/type@3.0.6': + resolution: {integrity: sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + '@intlify/bundle-utils@10.0.1': resolution: {integrity: sha512-WkaXfSevtpgtUR4t8K2M6lbR7g03mtOxFeh+vXp5KExvPqS12ppaRj1QxzwRuRI5VUto54A22BjKoBMLyHILWQ==} engines: {node: '>= 18'} @@ -1644,6 +1708,10 @@ packages: peerDependencies: rollup: 4.40.1 + '@mswjs/interceptors@0.37.6': + resolution: {integrity: sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==} + engines: {node: '>=18'} + '@napi-rs/wasm-runtime@0.2.7': resolution: {integrity: sha512-5yximcFK5FNompXfJFoWanu5l8v1hNGqNHh9du1xETp9HWk/B/PzvchX55WYOPaIeNglG8++68AAiauBAtbnzw==} @@ -1894,6 +1962,15 @@ packages: '@one-ini/wasm@0.1.1': resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} + '@open-draft/deferred-promise@2.2.0': + resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} + + '@open-draft/logger@0.3.0': + resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} + + '@open-draft/until@2.1.0': + resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@oxc-parser/binding-darwin-arm64@0.61.2': resolution: {integrity: sha512-xpDuwawMDCHg3plbSjpMbrhNTzO1AlvvHqsUOTE3WDmv5K7fFD72f3Pl+SxPJ4D/IhMdskec1B5ZfZHM1iAFmQ==} engines: {node: '>=14.0.0'} @@ -2415,10 +2492,20 @@ packages: resolution: {integrity: sha512-ID7fosbc50TbT0MK0EG12O+gAP3W3Aa/Pz4DaTtQtEvlc9Odaqi0de+xuZ7Li2GtK4HzEX7IuRWS/JmZLksR3Q==} engines: {node: '>=14'} + '@testing-library/dom@10.4.0': + resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} + engines: {node: '>=18'} + '@testing-library/dom@9.3.3': resolution: {integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==} engines: {node: '>=14'} + '@testing-library/user-event@14.6.1': + resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + '@testing-library/vue@8.1.0': resolution: {integrity: sha512-ls4RiHO1ta4mxqqajWRh8158uFObVrrtAPoxk7cIp4HrnQUj/ScKzqz53HxYpG3X6Zb7H2v+0eTGLSoy8HQ2nA==} engines: {node: '>=14'} @@ -2474,6 +2561,9 @@ packages: '@types/bun@1.2.10': resolution: {integrity: sha512-eilv6WFM3M0c9ztJt7/g80BDusK98z/FrFwseZgT4bXCq2vPhXD4z8R3oddmAn+R/Nmz9vBn4kweJKmGTZj+lg==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -2531,9 +2621,15 @@ packages: '@types/stack-utils@2.0.2': resolution: {integrity: sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==} + '@types/statuses@2.0.5': + resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/tough-cookie@4.0.3': resolution: {integrity: sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==} + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + '@types/triple-beam@1.3.5': resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} @@ -2729,6 +2825,21 @@ packages: vite: ^6.3.3 vue: ^3.5.13 + '@vitest/browser@3.1.2': + resolution: {integrity: sha512-dwL6hQg3NSDP3Z4xzIZL0xHq/AkQAPQ4StFpWVlY2zbRJtK3Y2YqdFZ7YmZjszTETN1BDQZRn/QOrcP+c8ATgg==} + peerDependencies: + playwright: '*' + safaridriver: '*' + vitest: 3.1.2 + webdriverio: ^7.0.0 || ^8.0.0 || ^9.0.0 + peerDependenciesMeta: + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + '@vitest/expect@3.1.2': resolution: {integrity: sha512-O8hJgr+zREopCAqWl3uCVaOdqJwZ9qaDwUP7vy3Xigad0phZe9APxKhPcDNqYYi0rX5oMvwJMSCAXY2afqeTSA==} @@ -2992,6 +3103,9 @@ packages: aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} @@ -3287,6 +3401,10 @@ packages: resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==} engines: {node: 10.* || >= 12.*} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + clipboardy@4.0.0: resolution: {integrity: sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==} engines: {node: '>=18'} @@ -3409,6 +3527,10 @@ packages: cookie-es@2.0.0: resolution: {integrity: sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==} + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + cookie@1.0.2: resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} engines: {node: '>=18'} @@ -4395,6 +4517,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql@16.11.0: + resolution: {integrity: sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + gzip-size@7.0.0: resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4508,6 +4634,9 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} @@ -4780,6 +4909,9 @@ packages: resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} engines: {node: '>= 0.4'} + is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} + is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} @@ -5669,9 +5801,23 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + msw@2.7.5: + resolution: {integrity: sha512-00MyTlY3TJutBa5kiU+jWiz2z5pNJDYHn2TgPkGkh92kMmNH43RqvMXd8y/7HxNn8RjzUbvZWYZjcS36fdb6sw==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: '>= 4.8.x' + peerDependenciesMeta: + typescript: + optional: true + muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -5956,6 +6102,9 @@ packages: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + oxc-parser@0.61.2: resolution: {integrity: sha512-ZJnAP7VLQhqqnfku7+gssTwmbQyfbZ552Vly4O2BMHkvDwfwLlPtAIYjMq57Lcj5HLmopI0oZlk7xTSML/YsZA==} engines: {node: '>=14.0.0'} @@ -6104,6 +6253,9 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -6440,6 +6592,9 @@ packages: protocols@2.0.1: resolution: {integrity: sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==} + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} + pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} @@ -6465,6 +6620,9 @@ packages: resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} engines: {node: '>=18'} + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -6648,6 +6806,9 @@ packages: require-package-name@2.0.1: resolution: {integrity: sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==} + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -6863,6 +7024,10 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} + sirv@3.0.1: + resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} + engines: {node: '>=18'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -6995,6 +7160,9 @@ packages: streamx@2.15.2: resolution: {integrity: sha512-b62pAV/aeMjUoRN2C/9F0n+G8AfcJjNC0zw/ZmOHeFsIe4m4GzjVW9m6VHXVjk536NbdU9JRwKMJRfkc+zUFTg==} + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + string-argv@0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} @@ -7214,6 +7382,10 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + tough-cookie@5.1.2: resolution: {integrity: sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==} engines: {node: '>=16'} @@ -7434,6 +7606,10 @@ packages: universal-user-agent@6.0.1: resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -7558,6 +7734,9 @@ packages: resolution: {integrity: sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + urlpattern-polyfill@10.0.0: resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} @@ -7706,6 +7885,14 @@ packages: yaml: optional: true + vitest-browser-vue@0.2.0: + resolution: {integrity: sha512-18v3uUQebbtSba2jbqcRvqfUCebd3f0nFA3BLKFZF9P0vnj7QgOm2JAxlcCA1ytNSnyzV3OtnNeNpThRaW6AfA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + '@vitest/browser': ^2.1.0 || ^3.0.0-0 + vitest: 3.1.2 + vue: ^3.5.13 + vitest-environment-nuxt@1.0.1: resolution: {integrity: sha512-eBCwtIQriXW5/M49FjqNKfnlJYlG2LWMSNFsRVKomc8CaMqmhQPBS5LZ9DlgYL9T8xIVsiA6RZn2lk7vxov3Ow==} @@ -7890,6 +8077,10 @@ packages: resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} engines: {node: '>= 12.0.0'} + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -8003,6 +8194,10 @@ packages: resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==} engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + youch-core@0.3.2: resolution: {integrity: sha512-fusrlIMLeRvTFYLUjJ9KzlGC3N+6MOPJ68HNj/yJv2nz7zq8t4HEviLms2gkdRPUS7F5rZ5n+pYx9r88m6IE1g==} engines: {node: '>=18'} @@ -8333,6 +8528,22 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@bundled-es-modules/cookie@2.0.1': + dependencies: + cookie: 0.7.2 + optional: true + + '@bundled-es-modules/statuses@1.0.1': + dependencies: + statuses: 2.0.1 + optional: true + + '@bundled-es-modules/tough-cookie@0.1.6': + dependencies: + '@types/tough-cookie': 4.0.5 + tough-cookie: 4.1.4 + optional: true + '@clack/core@0.4.1': dependencies: picocolors: 1.1.1 @@ -8897,6 +9108,36 @@ snapshots: '@humanwhocodes/retry@0.4.2': {} + '@inquirer/confirm@5.1.9(@types/node@22.15.3)': + dependencies: + '@inquirer/core': 10.1.10(@types/node@22.15.3) + '@inquirer/type': 3.0.6(@types/node@22.15.3) + optionalDependencies: + '@types/node': 22.15.3 + optional: true + + '@inquirer/core@10.1.10(@types/node@22.15.3)': + dependencies: + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.6(@types/node@22.15.3) + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + optionalDependencies: + '@types/node': 22.15.3 + optional: true + + '@inquirer/figures@1.0.11': + optional: true + + '@inquirer/type@3.0.6(@types/node@22.15.3)': + optionalDependencies: + '@types/node': 22.15.3 + optional: true + '@intlify/bundle-utils@10.0.1(vue-i18n@10.0.7(vue@3.5.13(typescript@5.8.3)))': dependencies: '@intlify/message-compiler': 11.1.2 @@ -9253,6 +9494,16 @@ snapshots: json5: 2.2.3 rollup: 4.40.1 + '@mswjs/interceptors@0.37.6': + dependencies: + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/logger': 0.3.0 + '@open-draft/until': 2.1.0 + is-node-process: 1.2.0 + outvariant: 1.4.3 + strict-event-emitter: 0.5.1 + optional: true + '@napi-rs/wasm-runtime@0.2.7': dependencies: '@emnapi/core': 1.3.1 @@ -9933,6 +10184,18 @@ snapshots: '@one-ini/wasm@0.1.1': {} + '@open-draft/deferred-promise@2.2.0': + optional: true + + '@open-draft/logger@0.3.0': + dependencies: + is-node-process: 1.2.0 + outvariant: 1.4.3 + optional: true + + '@open-draft/until@2.1.0': + optional: true + '@oxc-parser/binding-darwin-arm64@0.61.2': optional: true @@ -10340,6 +10603,17 @@ snapshots: '@teppeis/multimaps@3.0.0': {} + '@testing-library/dom@10.4.0': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/runtime': 7.23.2 + '@types/aria-query': 5.0.2 + aria-query: 5.3.0 + chalk: 4.1.2 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + pretty-format: 27.5.1 + '@testing-library/dom@9.3.3': dependencies: '@babel/code-frame': 7.26.2 @@ -10351,6 +10625,10 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 + '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.0)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.13)(vue@3.5.13(typescript@5.8.3))': dependencies: '@babel/runtime': 7.23.2 @@ -10409,6 +10687,9 @@ snapshots: dependencies: bun-types: 1.2.10 + '@types/cookie@0.6.0': + optional: true + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -10468,8 +10749,14 @@ snapshots: '@types/stack-utils@2.0.2': {} + '@types/statuses@2.0.5': + optional: true + '@types/tough-cookie@4.0.3': {} + '@types/tough-cookie@4.0.5': + optional: true + '@types/triple-beam@1.3.5': {} '@types/unist@2.0.10': {} @@ -10697,6 +10984,25 @@ snapshots: vite: 6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1) vue: 3.5.13(typescript@5.8.3) + '@vitest/browser@3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0) + '@vitest/mocker': 3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1)) + '@vitest/utils': 3.1.2 + magic-string: 0.30.17 + sirv: 3.0.1 + tinyrainbow: 2.0.0 + vitest: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) + ws: 8.18.1 + optionalDependencies: + playwright: 1.52.0 + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite + '@vitest/expect@3.1.2': dependencies: '@vitest/spy': 3.1.2 @@ -10704,12 +11010,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.2(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))': + '@vitest/mocker@3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: + msw: 2.7.5(@types/node@22.15.3)(typescript@5.8.3) vite: 6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1) '@vitest/pretty-format@3.1.2': @@ -11019,6 +11326,10 @@ snapshots: dependencies: deep-equal: 2.2.2 + aria-query@5.3.0: + dependencies: + dequal: 2.0.3 + array-buffer-byte-length@1.0.0: dependencies: call-bind: 1.0.5 @@ -11365,6 +11676,9 @@ snapshots: optionalDependencies: '@colors/colors': 1.5.0 + cli-width@4.1.0: + optional: true + clipboardy@4.0.0: dependencies: execa: 8.0.1 @@ -11468,6 +11782,9 @@ snapshots: cookie-es@2.0.0: {} + cookie@0.7.2: + optional: true + cookie@1.0.2: {} core-js-compat@3.41.0: @@ -12646,6 +12963,9 @@ snapshots: graphemer@1.4.0: {} + graphql@16.11.0: + optional: true + gzip-size@7.0.0: dependencies: duplexer: 0.1.2 @@ -12855,6 +13175,9 @@ snapshots: he@1.2.0: {} + headers-polyfill@4.0.3: + optional: true + hookable@5.5.3: {} hosted-git-info@7.0.2: @@ -13115,6 +13438,9 @@ snapshots: call-bind: 1.0.5 define-properties: 1.2.1 + is-node-process@1.2.0: + optional: true + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.0 @@ -14385,8 +14711,37 @@ snapshots: ms@2.1.3: {} + msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.9(@types/node@22.15.3) + '@mswjs/interceptors': 0.37.6 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + graphql: 16.11.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + strict-event-emitter: 0.5.1 + type-fest: 4.39.1 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - '@types/node' + optional: true + muggle-string@0.4.1: {} + mute-stream@2.0.0: + optional: true + mz@2.7.0: dependencies: any-promise: 1.3.0 @@ -14907,6 +15262,9 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + outvariant@1.4.3: + optional: true + oxc-parser@0.61.2: dependencies: '@oxc-project/types': 0.61.2 @@ -15089,6 +15447,9 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 + path-to-regexp@6.3.0: + optional: true + path-type@4.0.0: {} path-type@6.0.0: {} @@ -15410,6 +15771,11 @@ snapshots: protocols@2.0.1: {} + psl@1.15.0: + dependencies: + punycode: 2.3.1 + optional: true + pump@3.0.2: dependencies: end-of-stream: 1.4.4 @@ -15440,6 +15806,9 @@ snapshots: filter-obj: 5.1.0 split-on-first: 3.0.0 + querystringify@2.2.0: + optional: true + queue-microtask@1.2.3: {} queue-tick@1.0.1: {} @@ -15706,6 +16075,9 @@ snapshots: require-package-name@2.0.1: {} + requires-port@1.0.0: + optional: true + resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 @@ -15973,6 +16345,12 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 + sirv@3.0.1: + dependencies: + '@polka/url': 1.0.0-next.24 + mrmime: 2.0.0 + totalist: 3.0.1 + sisteransi@1.0.5: {} skin-tone@2.0.0: @@ -16098,6 +16476,9 @@ snapshots: fast-fifo: 1.3.2 queue-tick: 1.0.1 + strict-event-emitter@0.5.1: + optional: true + string-argv@0.3.1: {} string-length@4.0.2: @@ -16314,6 +16695,14 @@ snapshots: totalist@3.0.1: {} + tough-cookie@4.1.4: + dependencies: + psl: 1.15.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + optional: true + tough-cookie@5.1.2: dependencies: tldts: 6.1.50 @@ -16575,6 +16964,9 @@ snapshots: universal-user-agent@6.0.1: {} + universalify@0.2.0: + optional: true + universalify@2.0.1: {} unixify@1.0.0: @@ -16721,6 +17113,12 @@ snapshots: url-join@5.0.0: {} + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + optional: true + urlpattern-polyfill@10.0.0: {} urlpattern-polyfill@8.0.2: {} @@ -16861,14 +17259,21 @@ snapshots: terser: 5.24.0 yaml: 2.7.1 + vitest-browser-vue@0.2.0(@vitest/browser@3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2))(vitest@3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1))(vue@3.5.13(typescript@5.8.3)): + dependencies: + '@vitest/browser': 3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2) + '@vue/test-utils': 2.4.6 + vitest: 3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1) + vue: 3.5.13(typescript@5.8.3) + vitest-environment-nuxt@1.0.1: dependencies: '@nuxt/test-utils': 'link:' - vitest@3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(terser@5.24.0)(yaml@2.7.1): + vitest@3.1.2(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/browser@3.1.2)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.1.0)(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(terser@5.24.0)(yaml@2.7.1): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1)) + '@vitest/mocker': 3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -16891,6 +17296,7 @@ snapshots: optionalDependencies: '@types/debug': 4.1.12 '@types/node': 22.15.3 + '@vitest/browser': 3.1.2(msw@2.7.5(@types/node@22.15.3)(typescript@5.8.3))(playwright@1.52.0)(vite@6.3.4(@types/node@22.15.3)(jiti@2.4.2)(terser@5.24.0)(yaml@2.7.1))(vitest@3.1.2) happy-dom: 17.4.4 jsdom: 26.1.0 transitivePeerDependencies: @@ -17085,6 +17491,13 @@ snapshots: triple-beam: 1.4.1 winston-transport: 4.9.0 + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + optional: true + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -17164,6 +17577,9 @@ snapshots: yocto-queue@1.2.1: {} + yoctocolors-cjs@2.1.2: + optional: true + youch-core@0.3.2: dependencies: '@poppinss/exception': 1.2.0 diff --git a/src/config.ts b/src/config.ts index e17689064..c5c170381 100644 --- a/src/config.ts +++ b/src/config.ts @@ -102,7 +102,12 @@ export async function getVitestConfigFromNuxt( // overrides { define: { - ['process.env.NODE_ENV']: 'process.env.NODE_ENV', + // Commenting out this line allows Vitest Browser mode tests to run. + // Re-enabling this line causes the following errors: + // * ReferenceError: process is not defined + // * TypeError: Only orchestrator can create testers. + + // ['process.env.NODE_ENV']: 'process.env.NODE_ENV', }, test: { dir: process.cwd(), @@ -197,7 +202,7 @@ export async function getVitestConfigFromNuxt( } const resolver = createResolver(import.meta.url) - resolvedConfig.test.setupFiles.unshift(resolver.resolve('./runtime/entry')) + resolvedConfig.test.setupFiles.unshift(resolver.resolve('./runtime/entry.ts')) return resolvedConfig } From 8415444a8acc2668c07f86286aa0c06779543ad8 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 3 May 2025 16:21:36 +0100 Subject: [PATCH 2/4] fix: resolve to runtime file extension --- src/config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index c5c170381..8c013d751 100644 --- a/src/config.ts +++ b/src/config.ts @@ -6,7 +6,7 @@ import type { DotenvOptions } from 'c12' import type { InlineConfig } from 'vite' import type { DateString } from 'compatx' import { defu } from 'defu' -import { createResolver } from '@nuxt/kit' +import { createResolver, findPath } from '@nuxt/kit' import { applyEnv } from './utils' @@ -202,7 +202,8 @@ export async function getVitestConfigFromNuxt( } const resolver = createResolver(import.meta.url) - resolvedConfig.test.setupFiles.unshift(resolver.resolve('./runtime/entry.ts')) + const entryPath = resolver.resolve('./runtime/entry') + resolvedConfig.test.setupFiles.unshift(await findPath(entryPath) ?? entryPath) return resolvedConfig } From d008a64b307f449b67d12d3019dbab6f8e65b953 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 3 May 2025 16:25:05 +0100 Subject: [PATCH 3/4] fix: conditionally set `process.env.NODE_ENV` --- src/config.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8c013d751..8a0379e4a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -101,14 +101,9 @@ export async function getVitestConfigFromNuxt( const resolvedConfig = defu( // overrides { - define: { - // Commenting out this line allows Vitest Browser mode tests to run. - // Re-enabling this line causes the following errors: - // * ReferenceError: process is not defined - // * TypeError: Only orchestrator can create testers. - - // ['process.env.NODE_ENV']: 'process.env.NODE_ENV', - }, + define: options.viteConfig.test?.browser?.enabled + ? {} + : { ['process.env.NODE_ENV']: 'process.env.NODE_ENV' }, test: { dir: process.cwd(), environmentOptions: { From 103876ed8fa345ec9b391dc81f2f4494d0beb4e3 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 3 May 2025 16:43:00 +0100 Subject: [PATCH 4/4] fix: set `process.env.NODE_ENV` to `test` --- src/config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8a0379e4a..83f203879 100644 --- a/src/config.ts +++ b/src/config.ts @@ -101,9 +101,9 @@ export async function getVitestConfigFromNuxt( const resolvedConfig = defu( // overrides { - define: options.viteConfig.test?.browser?.enabled - ? {} - : { ['process.env.NODE_ENV']: 'process.env.NODE_ENV' }, + define: { + 'process.env.NODE_ENV': '"test"', + }, test: { dir: process.cwd(), environmentOptions: {