\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_",[2004,2005,2008],{"name":1985,"color":1986},{"name":2006,"color":2007},"vitest-environment","b60205",{"name":2009,"color":2010},"pending triage","5D08F5",935,"test-utils","How to mock custom imports while using mountSuspended to test","2024-09-09T02:17:10Z","https://github.com/nuxt/test-utils/issues/935",0.6876516,{"description":2018,"labels":2019,"number":2024,"owner":1994,"repository":2012,"state":1996,"title":2025,"updated_at":2026,"url":2027,"score":2028},"### Environment\r\n\r\nLocal machine\r\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v18.15.0\r\n- Nuxt Version: 3.7.1\r\n- CLI Version: 3.8.1\r\n- Nitro Version: 2.6.3\r\n- Package Manager: yarn@1.22.19\r\n- Builder: -\r\n- User Config: app, devtools, modules, tailwindcss, css, runtimeConfig, build\r\n- Runtime Modules: @nuxt/ui@2.12.0, @nuxtjs/tailwindcss@6.8.0, @nuxt/test-utils/module@3.9.0\r\n- Build Modules: -\r\n------------------------------\r\n\r\nStackblitz env\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: -\r\n- CLI Version: 3.10.0\r\n- Nitro Version: -\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: -\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nRepro stack blitz - https://stackblitz.com/edit/stackblitz-starters-cetpk5?file=vitest.config.js\r\n\r\n### Describe the bug\r\n\r\nWhen following testing documentation - https://nuxt.com/docs/getting-started/testing, after adding `vitest.config.{ts,js}` with `defineVitestConfig` and a basic test, `vitest run` fails with an error \r\n\r\n\u003Cdetails>\r\n\u003Csummary>Bash error.\u003C/summary>\r\n✘ [ERROR] \"@nuxt/test-utils/config\" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]\r\n\r\n node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68381:9:\r\n 68381 │ }\r\n ╵ ^\r\n\r\n at bundleConfigFile/setup/\u003C (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68381:35)\r\n at handlePlugins/requestCallbacks[\"on-resolve\"] (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1364:28)\r\n at handleRequest (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:722:17)\r\n at handleIncomingPacket (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:747:20)\r\n at readFromStdout (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:670:27)\r\n at EventEmitter.prototype.emit (node:events:42:9202)\r\n at addChunk (node:internal/streams/readable:105:4109)\r\n at readableAddChunk (node:internal/streams/readable:105:3816)\r\n at Readable.prototype.push (node:internal/streams/readable:105:2679)\r\n at onStreamRead (node:internal/stream_base_commons:158:2341)\r\n at _0x340f71/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:318835)\r\n at _0x241289 (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:320540)\r\n at _0x124cfc (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:317167)\r\n at _0x574284/\u003C/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319772)\r\n at _0x574284/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319750)\r\n at _0x574284 (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319784)\r\n\r\n This error came from the \"onResolve\" callback registered here:\r\n\r\n node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68345:26:\r\n 68345 │ name: 'inject-file-scope-variables',\r\n ╵ ^\r\n\r\n at setup (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68345:27)\r\n at handlePlugins (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1283:26)\r\n at buildOrContextImpl (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:969:18)\r\n at buildOrContext (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:778:23)\r\n at build/\u003C (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:2020:15)\r\n at build (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:2019:25)\r\n at build (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1853:51)\r\n at bundleConfigFile (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68306:35)\r\n at loadConfigFromFile (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68282:31)\r\n at resolveConfig (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:67884:34)\r\n at _createServer (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:60373:26)\r\n at createServer (/home/projects/stackblitz-starters-cetpk5/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:60370:12)\r\n at createViteServer (/home/projects/stackblitz-starters-cetpk5/node_modules/vitest/dist/vendor/node.xyYo9ZvH.js:7672:30)\r\n at createVitest (/home/projects/stackblitz-starters-cetpk5/node_modules/vitest/dist/vendor/node.xyYo9ZvH.js:8894:24)\r\n\r\n The plugin \"externalize-deps\" was triggered by this import\r\n\r\n vitest.config.js:4:35:\r\n 4 │ import { defineVitestConfig } from '@nuxt/test-utils/config'\r\n ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nfailed to load config from /home/projects/stackblitz-starters-cetpk5/vitest.config.js\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nError: Build failed with 1 error:\r\nnode_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:68381:9: ERROR: [plugin: externalize-deps] \"@nuxt/test-utils/config\" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.\r\n at failureErrorWithLog (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1641:15)\r\n at buildResponseToResult/\u003C (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1049:44)\r\n at runOnEndCallbacks (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1476:49)\r\n at buildResponseToResult (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1047:24)\r\n at buildOrContextContinue/\u003C (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:1076:16)\r\n at sendRequest/responseCallbacks[id] (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:694:17)\r\n at handleIncomingPacket (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:754:17)\r\n at readFromStdout (/home/projects/stackblitz-starters-cetpk5/node_modules/esbuild/lib/main.js:670:27)\r\n at EventEmitter.prototype.emit (node:events:42:9202)\r\n at addChunk (node:internal/streams/readable:105:4109)\r\n at readableAddChunk (node:internal/streams/readable:105:3816)\r\n at Readable.prototype.push (node:internal/streams/readable:105:2679)\r\n at onStreamRead (node:internal/stream_base_commons:158:2341)\r\n at _0x340f71/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:318835)\r\n at _0x241289 (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:320540)\r\n at _0x124cfc (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:317167)\r\n at _0x574284/\u003C/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319772)\r\n at _0x574284/\u003C (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319750)\r\n at _0x574284 (https://stackblitzstarterscetpk5-klbu.w-corp.staticblitz.com/blitz.f7aa08df.js:350:319784) {\r\n errors: [Getter/Setter],\r\n warnings: [Getter/Setter]\r\n}\r\n\u003C/details>\r\n\r\nIf there's something im doing wrong (eg Node version, some extra setup) this should be stated in the docs\r\n\r\n### Additional context\r\n\r\nSry if dupe, couldn't find a similar issue\r\n\r\n### Logs\r\n\r\n_No response_",[2020,2021],{"name":1988,"color":1989},{"name":2022,"color":2023},"good first issue","7057ff",704,"Following documentation and using `defineVitestConfig` results in an `[ERROR] \"@nuxt/test-utils/config\" resolved to an ESM file.`","2024-04-09T17:51:51Z","https://github.com/nuxt/test-utils/issues/704",0.7040198,{"description":2030,"labels":2031,"number":2034,"owner":1994,"repository":1995,"state":1996,"title":2035,"updated_at":2036,"url":2037,"score":2038},"### 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```",[2032,2033],{"name":1985,"color":1986},{"name":1991,"color":1992},3315,"arrow causes appear border in the last item of DropdownMenu","2025-02-17T11:48:29Z","https://github.com/nuxt/ui/issues/3315",0.7420088,{"description":2040,"labels":2041,"number":2047,"owner":1994,"repository":1995,"state":1996,"title":2048,"updated_at":2049,"url":2050,"score":2051},"### 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",[2042,2043,2044],{"name":1985,"color":1986},{"name":1991,"color":1992},{"name":2045,"color":2046},"triage","ffffff",3633,"Default padding on `UChip`","2025-03-20T09:21:01Z","https://github.com/nuxt/ui/issues/3633",0.74322,{"description":2053,"labels":2054,"number":2055,"owner":1994,"repository":2056,"state":2057,"title":2058,"updated_at":2059,"url":2060,"score":2061},"Going on this Page: https://nuxt.com/docs/getting-started/configuration and clicking on \"nuxt.config.ts\" results in a 404\r\nalso going to https://nuxt.com/docs/guide and going to nuxt.config.ts via the directory structure also returns into 404.",[],1391,"nuxt.com","closed","nuxt config returning 404","2023-10-25T09:32:28Z","https://github.com/nuxt/nuxt.com/issues/1391",0.68183655,{"description":2063,"labels":2064,"number":2065,"owner":1994,"repository":2056,"state":2057,"title":2066,"updated_at":2067,"url":2068,"score":2069},"- [ ] Missing hover underline https://www.notion.so/nuxt/Missing-hover-underline-742096075c3e4ae28a664e62fba887b1\n- [ ] Alert Contrast https://www.notion.so/nuxt/Alert-Contrast-0ccf042d4bc44a2b90e7e3076853a643",[],1094,"[Review] Alert","2023-10-10T14:45:06Z","https://github.com/nuxt/nuxt.com/issues/1094",0.6887913,{"description":2071,"labels":2072,"number":2076,"owner":1994,"repository":2056,"state":2057,"title":2077,"updated_at":2078,"url":2079,"score":2080},"Any clue @danielroe?\n\n",[2073],{"name":2074,"color":2075},"enhancement","1ad6ff",958,"Tell html-validtor to ignore module pages","2023-01-04T13:47:34Z","https://github.com/nuxt/nuxt.com/issues/958",0.6947144,{"description":2082,"labels":2083,"number":2088,"owner":1994,"repository":1995,"state":2057,"title":2089,"updated_at":2090,"url":2091,"score":2092},"### Description\n\nThe [migration](https://ui.nuxt.com/getting-started/migration) page should mention that the old implementation of [DatePicker](https://ui2.nuxt.com/components/date-picker#installation) component is no longer correct as it throw an error on v3.\n\n\n\n### Additional context\n\nNew [DatePicker](https://ui.nuxt.com/components/calendar#as-a-datepicker) implementation is different.",[2084,2086,2087],{"name":2074,"color":2085},"a2eeef",{"name":1991,"color":1992},{"name":2045,"color":2046},3557,"`DatePicker` v2 migration guide","2025-03-17T16:17:06Z","https://github.com/nuxt/ui/issues/3557",0.6956246,{"description":2094,"labels":2095,"number":2096,"owner":1994,"repository":2056,"state":2057,"title":2097,"updated_at":2098,"url":2099,"score":2100},"",[],990,"[Docs] Add pagination","2023-04-04T08:06:43Z","https://github.com/nuxt/nuxt.com/issues/990",0.70441586,["Reactive",2102],{},["Set"],["ShallowReactive",2105],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"fSqmfGOxfppOPgTjaWjIXLBnrhz7aCKWyhhrsoNc1qw":-1},"/nuxt/test-utils/895"]