\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_",[1984,1987,1990],{"name":1985,"color":1986},"bug","d73a4a",{"name":1988,"color":1989},"vitest-environment","b60205",{"name":1991,"color":1992},"pending triage","5D08F5",935,"nuxt","test-utils","open","How to mock custom imports while using mountSuspended to test","2024-09-09T02:17:10Z","https://github.com/nuxt/test-utils/issues/935",0.69944906,{"description":2002,"labels":2003,"number":2005,"owner":1994,"repository":1995,"state":1996,"title":2006,"updated_at":2007,"url":2008,"score":2009},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.15.4\n- CLI Version: 3.22.4\n- Nitro Version: 2.11.3\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: devtools, compatibilityDate\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-4czkz34t?file=components%2FMyComponent.vue,test%2FMyComponent.test.js\n\n### Describe the bug\n\nAfter using `setProps` in a component mounted with `mountSuspended`, using `$emit` inside a method will emit the event twice, which can be checked with `wrapper.emitted()`. This behaviour does not exist when using `mount()`. Please see reproduction link.\n\nA workaround is to use the `$emit` directly in the `@click` attribute, like this:\n\n```\n\u003Cbutton @click=\"$emit('test', 'a')\">test\u003C/button>\n```\n\nBut this is not sufficient if a method needs to be called that does other things as well besides emitting.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2004],{"name":1991,"color":1992},1176,"Component mounted with mountSuspended emits events twice after setProps was called","2025-03-07T17:48:54Z","https://github.com/nuxt/test-utils/issues/1176",0.71097755,{"description":2011,"labels":2012,"number":2020,"owner":1994,"repository":2021,"state":1996,"title":2022,"updated_at":2023,"url":2024,"score":2025},"### Environment\n\nN/A\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nN/A\n\n### Reproduction\n\nhttps://ui.nuxt.com/components/dashboard-sidebar#control-open-state\n\n### Description\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2013,2014,2017],{"name":1985,"color":1986},{"name":2015,"color":2016},"documentation","0075ca",{"name":2018,"color":2019},"v3","49DCB8",3561,"ui","Cloudflare error in docs","2025-03-17T14:40:36Z","https://github.com/nuxt/ui/issues/3561",0.7221229,{"description":2027,"labels":2028,"number":2031,"owner":1994,"repository":2021,"state":1996,"title":2032,"updated_at":2033,"url":2034,"score":2035},"### Environment\n\nOperating System: Windows 11\nNode Version: v22.14.0\nNuxt Version: 3.15.4\nCLI Version: 3.13.2\nNitro Version: 2.10.4\nPackage Manager: npm@11.1.0\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3.0.0-alpha.12\n\n### Reproduction\n\n.\n\n### Description\n\nHi\nWhen we use the arrow in the DropdownMenu component, a border is added to the last item. Apparently, this is because the arrow element is added at the end of the items groups in this component.\n\n\n\n\n\nI hope I was able to tell you what I meant. It's nothing special, but it would be great if it could be fixed. 🙄\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2029,2030],{"name":1985,"color":1986},{"name":2018,"color":2019},3315,"arrow causes appear border in the last item of DropdownMenu","2025-02-17T11:48:29Z","https://github.com/nuxt/ui/issues/3315",0.7443534,{"description":2037,"labels":2038,"number":2040,"owner":1994,"repository":1995,"state":1996,"title":2041,"updated_at":2042,"url":2043,"score":2044},"### Environment\r\n\r\n- Operating System: `Darwin`\r\n- Node Version: `v20.8.1`\r\n- Nuxt Version: `3.9.0`\r\n- CLI Version: `3.10.0`\r\n- Nitro Version: `2.8.1`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `-`\r\n- User Config: `devtools`, `modules`\r\n- Runtime Modules: `@nuxt/test-utils/module@3.9.0`\r\n- Build Modules: `-`\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-gee6qy?file=app.vue\r\n\r\n### Describe the bug\r\n\r\nOnce I expose a variable called `error` within the setup, the component fails to render. \r\nSince everything works within the dev server / build, I suspect this is something within `@nuxt/test-utils`\r\n\r\nAfter renaming the `error` variable to something else, the component can be mounted within the tests again.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\nVitest caught 1 unhandled error during the test run.\r\nThis might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nTypeError: 'set' on proxy: trap returned falsish for property 'error'\r\n ❯ clonedComponent.render node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs:128:44\r\n 126| renderContext[key] = passedProps[key];\r\n 127| }\r\n 128| return render.call(this, renderContext, ...args);\r\n | ^\r\n 129| } : void 0,\r\n 130| setup: setup ? (props2) => wrappedSetup(props2, setupContext) : void 0\r\n ❯ renderComponentRoot node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:868:16\r\n ❯ ReactiveEffect.componentUpdateFn node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5922:46\r\n ❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:174:19\r\n ❯ instance.update node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6053:16\r\n ❯ setupRenderEffect node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6063:5\r\n ❯ eval node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:1613:9\r\n\r\nThis error originated in \"test/app.nuxt.test.ts\" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.\r\nThe latest test that might've caused the error is \"Should mount\". It might mean one of the following:\r\n- The error was thrown, while Vitest was running this test.\r\n- This was the last recorded test before the error was thrown, if error originated after test finished its execution.\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\n```\r\n```\r\n",[2039],{"name":1985,"color":1986},684,"mountSuspended fails: 'set' on proxy: trap returned falsish for property 'error'","2025-03-14T15:14:45Z","https://github.com/nuxt/test-utils/issues/684",0.7636069,{"description":2046,"labels":2047,"number":2053,"owner":1994,"repository":2021,"state":1996,"title":2054,"updated_at":2055,"url":2056,"score":2057},"### Reproduction\n\n````\n\u003Ctemplate>\n \u003CUChip text=\"test\" size=\"3xl\">\n \u003CUButton icon=\"i-lucide-mail\" color=\"neutral\" variant=\"subtle\" />\n \u003C/UChip>\n\u003C/template>\n````\n\n### Description\n\nHey,\n\nThanks for your great work.\n\nI have noticed this on a few elements in UI3, but especaily here padding just is not right. Yes of course you can change it, but i belive there needs to be some sane defaults across all elements.\n\nText in chip, and even a simple number is almost unreadable see screenshot below. Happy to open a pr or list all other elements where this seems to have happened (one that comes to mind is UAvatar https://github.com/nuxt/ui/issues/3558).\n\n\n\n### Additional context\n\nThis example is directly from the UI website",[2048,2049,2050],{"name":1985,"color":1986},{"name":2018,"color":2019},{"name":2051,"color":2052},"triage","ffffff",3633,"Default padding on `UChip`","2025-03-20T09:21:01Z","https://github.com/nuxt/ui/issues/3633",0.7661685,{"description":2059,"labels":2060,"number":2064,"owner":1994,"repository":2021,"state":1996,"title":2065,"updated_at":2066,"url":2067,"score":2068},"### Environment\n\n\n\n- Operating System: Darwin\n- Node Version: v23.9.0\n- Nuxt Version: 3.16.2\n- CLI Version: 3.24.1\n- Nitro Version: 2.11.8\n- Package Manager: npm@10.9.2\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, components, css, devServer, ssr, vuefire, runtimeConfig\n- Runtime Modules: @nuxt/image@1.10.0, @nuxt/ui-pro@3.0.2, nuxt-vuefire@1.0.5\n- Build Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3.0.2\n\n### Reproduction\n\nThis is noticeable on the documentation [page](https://ui.nuxt.com/components/navigation-menu#orientation) for any vertical navigation menu with children navigation items. \n\n### Description\n\nThe parent item renders as a `\u003Cbutton>` tag instead of the `\u003Ca>` tags of other navigation menu items. This means the `to:` attribute is ignored (and target) and can't be clicked on. This is likely due to the parent and children being converted to a Collapsible component under the hood. \n\nWhen the orientation is horizontal, however, you can have both the parent and children be links - where they render `\u003Ca>` tags. Hovering over the horizontal parent shows the children, but the parent can still be a link.\n\nIdeally, we could set a boolean to control whether the children are converted to a Collapsible or not. Or wrap the Collapsible parent around a link. Understandably, the click then couldn't trigger opening/closing the collapsible (maybe the icon triggers opening/closing, while the label can still have the Link attributes available).\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2061,2062,2063],{"name":1985,"color":1986},{"name":2018,"color":2019},{"name":2051,"color":2052},3911,"[NavigationMenu] Vertical menu with children doesn't respect parent Link attributes.","2025-04-16T00:38:30Z","https://github.com/nuxt/ui/issues/3911",0.77230746,{"description":2070,"labels":2071,"number":2075,"owner":1994,"repository":1995,"state":2076,"title":2077,"updated_at":2078,"url":2079,"score":2080},"### 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",[2072,2073,2074],{"name":1985,"color":1986},{"name":1988,"color":1989},{"name":1991,"color":1992},895,"closed","Adding `/pages/index.vue` breaks e2e testing","2024-07-18T14:13:18Z","https://github.com/nuxt/test-utils/issues/895",0.7153065,{"description":2082,"labels":2083,"number":2087,"owner":1994,"repository":2088,"state":2076,"title":2089,"updated_at":2090,"url":2091,"score":2092},"Any clue @danielroe?\n\n",[2084],{"name":2085,"color":2086},"enhancement","1ad6ff",958,"nuxt.com","Tell html-validtor to ignore module pages","2023-01-04T13:47:34Z","https://github.com/nuxt/nuxt.com/issues/958",0.73038954,{"description":2094,"labels":2095,"number":2096,"owner":1994,"repository":2097,"state":2076,"title":2098,"updated_at":2099,"url":2100,"score":2101},"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","TailwindCSS v4","2025-03-10T13:13:24Z","https://github.com/nuxt/fonts/issues/468",0.74709296,["Reactive",2103],{},["Set"],["ShallowReactive",2106],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"iEajejqygRbwtBEfipMcHexfvZ3THJy9ihaY-5AzM0s":-1},"/nuxt/nuxt.com/990"]