\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\u003C/script>\r\n```\r\n\r\nApp.vue\r\n```\r\n\u003Ctemplate>\r\n \u003Cdiv>Message: {{ getMessage(\"Hello World\") }}\u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nimport { getMessage } from \"@/service/message-service\";\r\n```\r\n\r\nApp.test.ts\r\n```\r\nimport { it, expect, vi } from \"vitest\";\r\nimport { mountSuspended } from \"@nuxt/test-utils/runtime\";\r\nimport App from \"../../layouts/default.vue\";\r\n\r\nvi.mock(\"@/service/message-service\", () => {\r\n return {\r\n getMessage: () => \"hello from mock!!\",\r\n };\r\n});\r\n\r\n\r\nit(\"nuxt unit testing\", async () => {\r\n const component = await mountSuspended(App, { route: \"/\" });\r\n expect(component.html()).toMatchInlineSnapshot(\r\n `\"\u003Cdiv>Message: hello Hello World\u003C/div>\"`\r\n );\r\n});\r\n\r\n```\r\n\r\nmessage-service.ts\r\n```\r\nexport function getMessage(message: string): string {\r\n console.log(\"FROM ACTUAL\");\r\n return `hell ${message}`;\r\n}\r\n```\r\n\n\n### Describe the bug\n\nI was expecting vitest vi.mock should be able to mock imports to provide custom/mock implementation, however it seems that vi.mock is not working in the context of nuxt test?\r\n\r\nIf so, how are we suppose to create unit tests and/or E2E using nuxt/test-utils package and be able to provide flexible mocking mechanism?\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3032,3035,3038],{"name":3033,"color":3034},"bug","d73a4a",{"name":3036,"color":3037},"vitest-environment","b60205",{"name":3039,"color":3040},"pending triage","5D08F5",935,"How to mock custom imports while using mountSuspended to test","2024-09-09T02:17:10Z","https://github.com/nuxt/test-utils/issues/935",0.7767491,{"description":3047,"labels":3048,"number":3050,"owner":3022,"repository":3023,"state":3024,"title":3051,"updated_at":3052,"url":3053,"score":3054},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.10.3\r\n- CLI Version: 3.10.1\r\n- Nitro Version: 2.9.3\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- User Config: devtools, runtimeConfig, modules\r\n- Runtime Modules: @nuxt/test-utils/module@3.11.0\r\n- Build Modules: -\r\n------------------------------\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-j9nscj?file=vitest.config.ts\n\n### Describe the bug\n\nHi there,\r\n\r\nduring Migration i came across an issue. I still have some Options API Components which are using `this.$config.public` to access Nuxt Runtime Config.\r\n\r\nIt seems to be working fine but whenever i run vitest i receive the following error:\r\n\r\n`TypeError: Cannot read properties of undefined (reading 'public')`\r\n\r\nAn simple Workaround for this is to simply mock $config globally.\r\nBut shouldn't $config be working out of the box?\r\n\r\nThank you!\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nTypeError: Cannot read properties of undefined (reading 'public')\r\n ❯ Proxy.data components/withPublicConfigAccess.vue:7:26\r\n 8| \u003C/template>\r\n 9| \r\n 10| \u003Cscript>\r\n | ^\r\n 11| export default {\r\n 12| data() {\r\n ❯ applyOptions node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:3460:30\r\n ❯ finishComponentSetup node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7663:7\r\n ❯ setupStatefulComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7586:5\r\n ❯ setupComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7515:36\r\n ❯ mountComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5845:7\r\n ❯ processComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5811:9\r\n ❯ patch node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5290:11\r\n ❯ ReactiveEffect.componentUpdateFn node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5955:11\r\n ❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:181:19\n```\n",[3049],{"name":3039,"color":3040},773,"Access RuntimeConfig via $config returns undefined","2024-03-12T15:10:14Z","https://github.com/nuxt/test-utils/issues/773",0.78025067,{"description":3056,"labels":3057,"number":3063,"owner":3022,"repository":3023,"state":3024,"title":3064,"updated_at":3065,"url":3066,"score":3067},"### Environment\n\nhttps://stackblitz.com/edit/github-shyy23?file=pages%2Fmypage.vue\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-shyy23?file=pages%2Fmypage.vue\n\n### Describe the bug\n\n`expect(useRoute().path).toEqual('/')` fails when `navigateTo('/')` called within page component. Doesn't fail when called directly in test itself.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3058,3059,3060],{"name":3033,"color":3034},{"name":3036,"color":3037},{"name":3061,"color":3062},"stale","dadada",668,"navigateTo assert not working when triggered inside page","2024-04-29T16:10:06Z","https://github.com/nuxt/test-utils/issues/668",0.78262365,{"description":3069,"labels":3070,"number":3071,"owner":3022,"repository":3072,"state":3073,"title":3074,"updated_at":3075,"url":3076,"score":3077},"Now that TailwindCSS v4 is going stable, we should better support it.\n\n- [x] **Playground**: Add TailwindCSS v4 example. It'd be ideal if we can find a way to keep v3 and v4 in one npm project.\n- [x] **Test**: Test for TailwindCSS v4\n- [ ] Auto enable `experimental.processCSSVariables` if Tailwind v4 is detected (i.e. `@tailwindcss/vite` is installed)",[],468,"fonts","closed","TailwindCSS v4","2025-03-10T13:13:24Z","https://github.com/nuxt/fonts/issues/468",0.7699359,{"description":3079,"labels":3080,"number":3021,"owner":3022,"repository":3084,"state":3073,"title":3085,"updated_at":3086,"url":3087,"score":3028},"",[3081],{"name":3082,"color":3083},"enhancement","1ad6ff","nuxt.com","Show active users on files only on valid branch","2023-02-15T12:31:24Z","https://github.com/nuxt/nuxt.com/issues/342",{"description":3089,"labels":3090,"number":3098,"owner":3022,"repository":3099,"state":3073,"title":3100,"updated_at":3101,"url":3102,"score":3103},"### Environment\n\nWhen navigating to any component on the `ui.nuxt.com` website, it displays a 500 error and fails to show any content.\n\n\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3.0.2\n\n### Reproduction\n\nhttps://ui.nuxt.com\n\n### Description\n\nWhen using the `ui.nuxt.com` website and navigating to any component, the site 500 errors.\n\n### Additional context\n\nOnly seems to occur on the latest version of firefox, works fine on chrome.\n\n### Logs\n\n```shell-script\n\n```",[3091,3092,3095],{"name":3033,"color":3034},{"name":3093,"color":3094},"v3","49DCB8",{"name":3096,"color":3097},"triage","ffffff",3804,"ui","`ui.nuxt.com` 500 errors","2025-04-08T00:51:08Z","https://github.com/nuxt/ui/issues/3804",0.775044,{"description":3105,"labels":3106,"number":3110,"owner":3022,"repository":3023,"state":3073,"title":3111,"updated_at":3112,"url":3113,"score":3114},"### Environment\n\nReproduction: https://stackblitz.com/edit/github-gu1sj1-xq3xf8?file=tests%2Fe2e%2Fbasic.e2e.test.ts\r\n\r\nA minimal repo with just [vitest](https://github.com/vitest-dev/vitest) and [@nuxt/test-utils](https://github.com/nuxt/test-utils), an app.vue, and a `pages/index.vue` fails with error:\r\n\r\n```js\r\n❯ npm run test\r\n\r\n> test\r\n> vitest\r\n\r\nRunning with compatibility version `4`\r\n\r\n DEV v1.6.0 /home/projects/github-gu1sj1-xq3xf8/app\r\n\r\n ❯ ../tests/e2e/basic.e2e.test.ts (1)\r\n ❯ basic (1)\r\n ⠹ [ beforeAll ]\r\n · contains Welcome to Nuxt! string\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\n FAIL ../tests/e2e/basic.e2e.test.ts > basic\r\nError: Cannot find any nuxt version from ./app\r\n ❯ Module.loadNuxt ../node_modules/@nuxt/kit/dist/index.mjs:2729:11\r\n ❯ loadFixture ../node_modules/@nuxt/test-utils/dist/shared/test-utils.C7cWLW4C.mjs:102:14\r\n 100| });\r\n 101| const buildDir = ctx.nuxt.options.buildDir;\r\n 102| if (!existsSync(buildDir)) {\r\n | ^\r\n 103| await promises.mkdir(buildDir, { recursive: true });\r\n 104| ctx.teardown = ctx.teardown || [];\r\n ❯ setup2 ../node_modules/@nuxt/test-utils/dist/shared/test-utils.C7cWLW4C.mjs:178:7\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\r\n\r\n Test Files 1 failed (1)\r\n Tests (1)\r\n Start at 09:54:14\r\n Duration 4.84s (transform 445ms, setup 45ms, collect 2.14s, tests 5ms, environment 0ms, prepare 807ms)\r\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-gu1sj1-xq3xf8?file=tests%2Fe2e%2Fbasic.e2e.test.ts\n\n### Describe the bug\n\nCannot successfully end-to-end test if there is a pages directory with an index.vue.\n\n### Additional context\n\n```\r\n\"dependencies\": {\r\n \"@nuxt/test-utils\": \"^3.13.1\",\r\n \"nuxt\": \"^3.12.3\",\r\n \"vitest\": \"^1.4.0\",\r\n \"vue\": \"latest\"\r\n }\r\n```\n\n### Logs\n\n```shell-script\n❯ npm run test\r\n\r\n> test\r\n> vitest\r\n\r\nRunning with compatibility version `4`\r\n\r\n DEV v1.6.0 /home/projects/github-gu1sj1-xq3xf8/app\r\n\r\n ❯ ../tests/e2e/basic.e2e.test.ts (1)\r\n ❯ basic (1)\r\n ⠹ [ beforeAll ]\r\n · contains Welcome to Nuxt! string\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\n FAIL ../tests/e2e/basic.e2e.test.ts > basic\r\nError: Cannot find any nuxt version from ./app\r\n ❯ Module.loadNuxt ../node_modules/@nuxt/kit/dist/index.mjs:2729:11\r\n ❯ loadFixture ../node_modules/@nuxt/test-utils/dist/shared/test-utils.C7cWLW4C.mjs:102:14\r\n 100| });\r\n 101| const buildDir = ctx.nuxt.options.buildDir;\r\n 102| if (!existsSync(buildDir)) {\r\n | ^\r\n 103| await promises.mkdir(buildDir, { recursive: true });\r\n 104| ctx.teardown = ctx.teardown || [];\r\n ❯ setup2 ../node_modules/@nuxt/test-utils/dist/shared/test-utils.C7cWLW4C.mjs:178:7\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\r\n\r\n Test Files 1 failed (1)\r\n Tests (1)\r\n Start at 09:54:14\r\n Duration 4.84s (transform 445ms, setup 45ms, collect 2.14s, tests 5ms, environment 0ms, prepare 807ms)\n```\n",[3107,3108,3109],{"name":3033,"color":3034},{"name":3036,"color":3037},{"name":3039,"color":3040},895,"Adding `/pages/index.vue` breaks e2e testing","2024-07-18T14:13:18Z","https://github.com/nuxt/test-utils/issues/895",0.7762544,{"description":3116,"labels":3117,"number":3119,"owner":3022,"repository":3084,"state":3073,"title":3120,"updated_at":3121,"url":3122,"score":3123},"Respectively to `contact@nuxt.com` / `support@nuxt.com` / `careers@nuxt.com`",[3118],{"name":3082,"color":3083},503,"[Company] `contact` / `support` / `careers` forms should send an email","2023-02-15T12:32:26Z","https://github.com/nuxt/nuxt.com/issues/503",0.77754796,{"description":3125,"labels":3126,"number":3119,"owner":3022,"repository":3023,"state":3073,"title":3128,"updated_at":3129,"url":3130,"score":3123},"After updating happy-dom to the latest version **10.5.2** ,\r\nI have this error when I run my app : \r\n`Error while requiring module vitest-environment-nuxt/module: Error: Cannot find module '/Users/\u003Cuser>/\u003Cfolderpath>/vitest-environment-nuxt/module'`\r\n\r\nDoes anyone have a solution ?",[3127],{"name":3036,"color":3037},"Error after updating happy dom dependency","2023-12-02T00:17:10Z","https://github.com/nuxt/test-utils/issues/503",["Reactive",3132],{},["Set"],["ShallowReactive",3135],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$ftFro8ik3PZvTZitgQKiJVaRuq-X3hGOsGC_9HsTun_I":-1},"/nuxt/ui/3147"]