\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nconst dynamic_image_name = 'zero-config.svg';\r\n\u003C/script>\r\n```\r\n\r\nthen this is rendered as \r\n```html\r\n\u003Cimg src=\"~/assets/zero-config.svg\" alt=\"Discover Nuxt 3\">\r\n```\r\nwithout correctly resolving (and copying) the image, thus it doesn't show in the browser.\n\n### Additional context\n\nRefs https://github.com/nuxt/framework/pull/6635.\n\n### Logs\n\n_No response_",[1984,1987],{"name":1985,"color":1986},"documentation","5319e7",{"name":1988,"color":1989},"dx","C39D69",14766,"nuxt","open","Assets with dynamic names are not resolved","2025-01-11T09:07:17Z","https://github.com/nuxt/nuxt/issues/14766",0.74599046,{"description":1998,"labels":1999,"number":2003,"owner":1991,"repository":2004,"state":2005,"title":2006,"updated_at":2007,"url":2008,"score":2009},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v18.19.0\r\n- Nuxt Version: 3.9.3\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.1\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- Build Modules: -\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-vy6psx-sn3lfr\r\n\r\n### Describe the bug\r\n\r\n`\r\n[Vue warn]: Cannot mutate \u003Cscript setup> binding \"nuxtApp\" from Options API. \r\n at \u003CMountSuspendedComponent > \r\n at \u003CMountSuspendedHelper> \r\n at \u003CAnonymous ref=\"VTU_COMPONENT\" > \r\n at \u003CVTUROOT>\r\n[Vue warn]: Unhandled error during execution of render function \r\n at \u003CMountSuspendedComponent > \r\n at \u003CMountSuspendedHelper> \r\n at \u003CAnonymous ref=\"VTU_COMPONENT\" > \r\n at \u003CVTUROOT>\r\n`\r\n\r\n \r\n \r\nI get this error message whenever I try to use useNudxtApp() in a component.\r\nBefore the merge of nuxt-vitest and @nuxt/text-utils, this worked fine.\r\n\r\n### Additional context\r\n\r\nTests can be ran with: npm run test ./pages/__tests__/index.spec.ts\r\n\r\n### Logs\r\n\r\n_No response_",[2000],{"name":2001,"color":2002},"pending triage","5D08F5",744,"test-utils","closed","Test fails if useNuxtApp used","2024-12-03T21:09:37Z","https://github.com/nuxt/test-utils/issues/744",0.45803216,{"description":2011,"labels":2012,"number":2016,"owner":1991,"repository":1991,"state":2005,"title":2017,"updated_at":2018,"url":2019,"score":2020},"I have a big project here that I tried to update for `nuxt` to `nuxt-edge`.\r\n\r\nWhen I run `nuxt build` I see a lot of errors like this:\r\n```\r\nConflict: Multiple assets emit to the same filename xxxx.css\r\n```",[2013],{"name":2014,"color":2015},"2.x","d4c5f9",3152,"Conflict: Multiple assets emit to the same filename","2023-01-18T16:10:06Z","https://github.com/nuxt/nuxt/issues/3152",0.72304034,{"labels":2022,"number":2026,"owner":1991,"repository":1991,"state":2005,"title":2027,"updated_at":2028,"url":2029,"score":2030},[2023,2025],{"name":2001,"color":2024},"E99695",{"name":2014,"color":2015},7665,"since nuxt@2.13.3 some modern files are missing?","2023-01-22T15:36:01Z","https://github.com/nuxt/nuxt/issues/7665",0.7245318,{"description":2032,"labels":2033,"number":2037,"owner":1991,"repository":2038,"state":2005,"title":2039,"updated_at":2040,"url":2041,"score":2042},"I believe it is based on content-v2 and `serverAssets` but would love @pi0 review on this :blush: \n\nDeployment can also be found on https://vercel.com/nuxtlabs/nuxt-com/TCi5cqbWZeJoVooqm4cWCBDrfNRN\n\n",[2034],{"name":2035,"color":2036},"bug","ff281a",409,"nuxt.com","Build is broken","2022-05-12T08:03:18Z","https://github.com/nuxt/nuxt.com/issues/409",0.73334277,{"description":2044,"labels":2045,"number":2037,"owner":1991,"repository":2004,"state":2005,"title":2046,"updated_at":2047,"url":2048,"score":2042},"I have composable file **state.ts:**\r\n\r\nconst useCounter = () => useState('counter', () => 0);\r\nexport default useCounter;\r\nand I use this **useCounter** in **index.vue**, so when I test this component I get the error: useState is not defined\r\n**It's my index.test.ts:**\r\n\r\nimport { describe, expect, test, beforeEach } from 'vitest';\r\nimport { mount } from '@vue/test-utils';\r\nimport HomePage from '~/pages/index.vue';\r\nimport useCounter from '~/composables/states';\r\n\r\ndescribe('Home page', () => {\r\nlet wrapper;\r\nbeforeEach(() => {\r\nwrapper = mount(HomePage);\r\n});\r\n\r\ntest('is a Vue instance', () => {\r\nexpect(wrapper.vm).toBeTruthy();\r\n});\r\n\r\ntest('initializes with a default value of 0', () => {\r\nconst counter = useCounter();\r\nexpect(counter.value).toBe(0);\r\n});\r\n});\r\nI've tried a lot of ways and nothing works. Could someone encounter this issue while testing?\r\n\r\n**Reproduction**\r\nhttps://stackblitz.com/edit/nuxt-starter-hwb5wz?file=tests%2Funit%2Fpages%2Findex.test.ts\r\n**run test:** npm run test\r\n\r\n",[],"When testing with Vitest I get the error useState is not a function in Nuxt 3","2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/409",{"description":2050,"labels":2051,"number":2056,"owner":1991,"repository":1991,"state":2005,"title":2057,"updated_at":2058,"url":2059,"score":2060},"### Environment\r\n\r\n- Operating System: Windows_NT\r\n- Node Version: v21.0.0\r\n- Nuxt Version: 3.8.0\r\n- CLI Version: 3.9.1\r\n- Nitro Version: 2.6.3\r\n- Package Manager: npm@10.2.0\r\n- Builder: -\r\n- User Config: devtools, router, alias, image, modules, imports, routeRules, nitro, experimental, app\r\n- Runtime Modules: @vueuse/nuxt@10.4.1, @nuxt/image-edge@1.0.0-rc.3-28271297.f1bc89f, @formkit/auto-animate/nuxt@0.8.0, @nuxtjs/robots@3.0.0\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\n\r\n\r\n***Unfortunately, the error is not a constant one, as it happens to occur on some occassions***\r\n\r\n### Describe the bug\r\n\r\n\r\n\r\n# PostCSS mistakens script tag for style tag once in a while.\r\nThis error happens sometimes when I make little changes and this one happened when I added a new function to Vue script[setup] tag. I don't get any results after reloading my current page, or reverting my changes, but only until I restart my development server, and most times by deleting the **.nuxt** folder. I initially thought that this error was due to my ***experimental*** option set with at least one key in ***nuxt.config.ts***, but it still occurred without any ***experimental*** set.\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2052,2055],{"name":2053,"color":2054},"3.x","29bc7f",{"name":2001,"color":2024},23957,"Error on keywords that shouldn't be unknown","2023-10-26T16:06:38Z","https://github.com/nuxt/nuxt/issues/23957",0.7339828,{"description":2062,"labels":2063,"number":2072,"owner":1991,"repository":1991,"state":2005,"title":2073,"updated_at":2074,"url":2075,"score":2076},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v22.10.0\n- Nuxt Version: 3.14.159\n- CLI Version: 3.15.0\n- Nitro Version: 2.10.4\n- Package Manager: npm@10.9.0\n- Builder: -\n- User Config: default\n- Runtime Modules: @nuxt/eslint@0.6.1\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-lbutem?file=pages%2Findex.vue\n\n### Describe the bug\n\nLinks to files in Nuxt's `public` folder are sometimes broken if the path starts with `/assets/`, as it will be replaced with `/&/assets/`. It works fine on the initial render of an `img` element, but if a re-render updates that element, this issue occurs.\n\nReproduction steps:\n1. Open the minimal reproduction link.\n2. Click the link to page 2.\n3. Notice the image is now broken because its `href` was jumbled.\n\n### Additional context\n\nI have only tested this for images (`\u003Cimg src=\"/assets/...\" />`). I don't know if it applies to other forms of references to static assets in the `public/assets` folder.",[2064,2066,2069],{"name":2035,"color":2065},"d73a4a",{"name":2067,"color":2068},"vite","3574D1",{"name":2070,"color":2071},"upstream","E8A36D",30107,"Can't name folder \"assets\" in `public` without issues re-rendering components","2024-12-02T10:04:42Z","https://github.com/nuxt/nuxt/issues/30107",0.7365948,{"description":2078,"labels":2079,"number":2081,"owner":1991,"repository":2038,"state":2005,"title":2082,"updated_at":2083,"url":2084,"score":2085},"\n",[2080],{"name":2035,"color":2036},567,"[Docs] Framework v3 asset error on load","2023-02-15T12:30:49Z","https://github.com/nuxt/nuxt.com/issues/567",0.7384988,{"description":2087,"labels":2088,"number":2081,"owner":1991,"repository":2004,"state":2005,"title":2092,"updated_at":2093,"url":2094,"score":2085},"Hello, I'm having a hard time understanding and finding information on how to mock useFetch/useAsyncData returned data. \r\nI've tried using the following as well as an MSW server included in `vitest.setup.ts` but with no success:\r\n\r\nHere's an example component `pages/test.vue`:\r\n```\r\n\u003Cscript setup>\r\nconst { data: users } = useFetch('https://jsonplaceholder.typicode.com/users');\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cul>\r\n \u003Cli v-for=\"user in users\" :key=\"user.id\">\r\n \u003Cp>{{ user.id }}\u003C/p>\r\n \u003Cp>{{ user.name }}\u003C/p>\r\n \u003C/li>\r\n \u003C/ul>\r\n\u003C/template>\r\n```\r\n`pages/__tests__/Test.spec.ts`:\r\n```\r\n// @vitest-environment nuxt\r\nimport { describe, expect, it } from 'vitest';\r\nimport { mount } from '@vue/test-utils';\r\nimport { mockNuxtImport } from 'nuxt-vitest/utils';\r\nimport Test from '../test.vue';\r\n\r\nmockNuxtImport('useFetch', () => {\r\n return () =>\r\n vi.fn(() => {\r\n return {\r\n error: undefined,\r\n data: [\r\n {\r\n id: 1,\r\n name: 'John Doe',\r\n },\r\n ],\r\n pending: false,\r\n refresh: vi.fn(),\r\n };\r\n });\r\n});\r\n\r\nvi.stubGlobal('useFetch', () => {\r\n return () =>\r\n vi.fn(() => {\r\n return {\r\n error: undefined,\r\n data: [\r\n {\r\n id: 1,\r\n name: 'John Doe',\r\n },\r\n ],\r\n pending: false,\r\n refresh: vi.fn(),\r\n };\r\n });\r\n});\r\n\r\ndescribe('Test', () => {\r\n const wrapper = mount(Test);\r\n\r\n it('should render correctly', () => {\r\n expect(wrapper.html()).toMatchSnapshot();\r\n });\r\n});\r\n```\r\nIn the snapshot I can see that no data was fetched and nothing changes no matter which above mentioned method I try to mock the data with.\r\n`pages/__tests__/__snapshots__/Test.spec.ts.snap`\r\n```\r\n// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html\r\n\r\nexports[`Test > should render correctly 1`] = `\"\u003Cul>\u003C/ul>\"`;\r\n```\r\n`vitest.config.ts`\r\n```\r\nimport { defineVitestConfig } from 'nuxt-vitest/config';\r\n\r\nexport default defineVitestConfig({\r\n test: {\r\n environment: 'happy-dom',\r\n setupFiles: ['./vitest.setup.ts'],\r\n },\r\n});\r\n```\r\n`vitest.setup.ts`\r\n```\r\nimport { rest } from 'msw';\r\nimport { setupServer } from 'msw/node';\r\n\r\nconst users = [\r\n {\r\n id: 1,\r\n name: 'John Doe',\r\n },\r\n];\r\n\r\nexport const restHandlers = [\r\n rest.get('https://jsonplaceholder.typicode.com/users', (req, res, ctx) => {\r\n return res(ctx.status(200), ctx.json(users));\r\n }),\r\n];\r\n\r\nconst server = setupServer(...restHandlers);\r\n\r\n// Start server before all tests\r\nbeforeAll(() => server.listen({ onUnhandledRequest: 'error' }));\r\n\r\n// Close server after all tests\r\nafterAll(() => server.close());\r\n\r\n// Reset handlers after each test `important for test isolation`\r\nafterEach(() => server.resetHandlers());\r\n```",[2089],{"name":2090,"color":2091},"vitest-environment","b60205","API data mocking","2023-12-02T00:32:12Z","https://github.com/nuxt/test-utils/issues/567",["Reactive",2096],{},["Set"],["ShallowReactive",2099],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"NfDxynhUIfdccoSKa7Rm_Ftl1sQl4vjUp3HMOWurk7o":-1},"/nuxt/nuxt.com/744"]