\n\u003C!-- OR -->\n\u003CIcon name=\"my-icon:a\" v-if=\"flag\" />\n\u003CIcon name=\"my-icon:b\" v-else />\n```\nin `nuxt.config.ts`\n```ts\nicon: {\n provider: 'server',\n customCollections: [\n {\n prefix: 'my-icon',\n dir: './assets/icon/svg',\n },\n ],\n},\n// ...\nnitro: {\n preset: 'static',\n},\n```\n\nIf toggle value of `flag`, \neverything works well in development, \nbut it throws 404 error for `my-icon:b` after building and generating.\n(it works well with `v-show`) \n\nProject info:\n```\n------------------------------\n- Operating System: Windows_NT\n- Node Version: v22.8.0\n- Nuxt Version: 3.16.0\n- CLI Version: 3.23.0\n- Nitro Version: 2.11.6\n- Package Manager: pnpm@9.9.0\n- Builder: -\n- User Config: modules, icon, colorMode, shadcn, fonts, googleSignIn, app, imports, css, vite, nitro, compatibilityDate, telemetry\n- Runtime Modules: @nuxtjs/tailwindcss@6.13.2, @nuxt/icon@1.11.0, @nuxt/fonts@0.11.0, @nuxt/image@1.9.0, @nuxt/eslint@1.2.0, @pinia/nuxt@0.10.1, pinia-plugin-persistedstate/nuxt@4.2.0, @nuxt/test-utils/module@3.17.2, @nuxtjs/color-mode@3.5.2, shadcn-nuxt@1.0.3, @vueuse/nuxt@13.0.0, nuxt-vue3-google-signin@0.0.11\n- Build Modules: -\n------------------------------\n```\n",[],380,"nuxt","icon","open","Local icon 404 after `nuxi generating` if with `:name=\"flag?'my-icon:icon-a':'my-icon:icon-b'\"`","2025-03-26T15:31:52Z","https://github.com/nuxt/icon/issues/380",0.68501014,{"description":1993,"labels":1994,"number":1998,"owner":1985,"repository":1985,"state":1999,"title":2000,"updated_at":2001,"url":2002,"score":2003},"Hello, \r\n\r\nI'm thinking about creating a module providing some testing configuration. The plugin would work with [Jest](https://facebook.github.io/jest), allowing to unit test components, vuex stores, plugins… The whole configuration will be already done, and developers would just have to include it.\r\n\r\nBut, before getting started, I'd like some information :\r\n\r\n1. Is such plugin welcome ? Or do you plan to support testing natively in Nuxt ?\r\n1. The plugin would provide a testing script, is it possible from a module to extend the Nuxt scripts (And provide `nuxt test` for exemple) ?\r\n\r\nFor now, I implemented some testing setup here : https://github.com/antoinerey/nuxt-jest\r\n\r\n**Edit**: The more I think about it, the more I feel like it'd be better to make a vue-cli plugin. What do you think ?\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2610\">#c2610\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[1995],{"name":1996,"color":1997},"2.x","d4c5f9",3013,"closed","Testing module","2023-01-18T16:09:51Z","https://github.com/nuxt/nuxt/issues/3013",0.6191637,{"description":2005,"labels":2006,"number":2007,"owner":1985,"repository":2008,"state":1999,"title":2009,"updated_at":2010,"url":2011,"score":2012},"Right now the docs has a quite limitation and there is no guidance on integrating with a full Nuxt app which contains pages with may api calls, not just plugin or components let alone ts module import.\r\n\r\nIt would be much appreciated if you can expand the docs on for a more specific cases or may be some examples on this repo or say a fiddle, codepen, codesandbox ?",[],265,"test-utils","more docs on how to mock test for a page","2023-12-02T00:18:11Z","https://github.com/nuxt/test-utils/issues/265",0.6430497,{"description":2005,"labels":2014,"number":2015,"owner":1985,"repository":2008,"state":1999,"title":2009,"updated_at":2016,"url":2017,"score":2012},[],355,"2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/355",{"description":2019,"labels":2020,"number":2021,"owner":1985,"repository":2008,"state":1999,"title":2022,"updated_at":2023,"url":2024,"score":2025},"Hello everyone,\r\n\r\nI have a few questions about Nuxt test-utils.\r\n\r\nMy situation:\r\n\r\n- I have a Vue.js project with Vue test-utils;\r\n- I have a Nuxt.js project where I would like to add testing;\r\n\r\nI'm looking into different options for libraries to test my Nuxt.js project. Ideally, I would like to have something very similar to Vue test-utils, in order to avoid headaches when working on both projects. Nuxt test-utils seems like an interesting option, but I was wondering what are its advantages compared to just using Vue test-utils? Thanks!",[],296,"Question: Vue test-utils vs Nuxt test-utils","2023-12-02T00:23:09Z","https://github.com/nuxt/test-utils/issues/296",0.64529675,{"description":2019,"labels":2027,"number":2028,"owner":1985,"repository":2008,"state":1999,"title":2022,"updated_at":2016,"url":2029,"score":2025},[],370,"https://github.com/nuxt/test-utils/issues/370",{"description":2031,"labels":2032,"number":2037,"owner":1985,"repository":1985,"state":1999,"title":2038,"updated_at":2039,"url":2040,"score":2041},"### What problem does this feature solve?\n\nI cannot find a working solution that let's me use ava or jest to run unit tests that utilize the Vue Test Utils library. Given that both Vue Test Utils and Nuxt appear to hold strong positions within the Vue community, I think it makes sense to ensure that Vue Test Utils can be utilized for both Nuxt universal and Nuxt SPAs\n\n### What does the proposed changes look like?\n\nNuxt should seamlessly let developers run tests with runners like jest or ava while using Vue-test-utils as well as modern ES features (import statements). Importing .vue SFCs from your test files would work fine, using the import statement would work fine, and utilizing Vue Test Util features like shallowMount would work fine.\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This feature request is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c7972\">#c7972\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2033,2036],{"name":2034,"color":2035},"enhancement","8DEF37",{"name":1996,"color":1997},4115,"Enable Vue-Test-Utils to work with Nuxt","2023-01-22T15:50:48Z","https://github.com/nuxt/nuxt/issues/4115",0.6525542,{"description":2043,"labels":2044,"number":2048,"owner":1985,"repository":2008,"state":1999,"title":2049,"updated_at":2050,"url":2051,"score":2052},"I have a nuxt project here using typescript in components placed in .vue files\r\n\r\nGiven this test for a component\r\n\r\n```typescript\r\n\r\nimport { mount } from '@nuxt/test-utils'\r\nimport LoginForm from '@/components/auth/LoginForm'\r\ndescribe('LoginForm', () => {\r\n test('is a Vue instance', () => {\r\n const wrapper = mount(LoginForm)\r\n expect(wrapper.vm).toBeTruthy()\r\n })\r\n})\r\n\r\n```\r\n\r\nthis component makes the test pass: \r\n\r\n```vue\r\n\u003Ctemplate>\r\n\r\n\u003C/template>\r\n\u003Cscript>\r\n\r\n\u003C/script>\r\n```\r\n\r\nand this component breaks it \r\n\r\n```vue\r\n\u003Ctemplate>\r\n\r\n\u003C/template>\r\n\u003Cscript lang=\"ts\">\r\n\r\n\u003C/script>\r\n```\r\n\r\nwith a error: \r\n\r\n```\r\nTest suite failed to run\r\n\r\n Jest encountered an unexpected token\r\n\r\n Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.\r\n\r\n Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.\r\n\r\n By default \"node_modules\" folder is ignored by transformers.\r\n\r\n Here's what you can do:\r\n • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.\r\n • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript\r\n • To have some of your \"node_modules\" files transformed, you can specify a custom \"transformIgnorePatterns\" in your config.\r\n • If you need a custom transformation specify a \"transform\" option in your config.\r\n • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the \"moduleNameMapper\" config option.\r\n\r\n You'll find more details and examples of these config options in the docs:\r\n https://jestjs.io/docs/configuration\r\n For information about custom transformations, see:\r\n https://jestjs.io/docs/code-transformation\r\n\r\n```\r\n\r\nAny hint of how to get typescript components to run in tests?\r\n\r\n\r\nnode: 17.0.1\r\n \"nuxt\": \"2.15.8\",\r\n \"@nuxt/test-utils\": \"^0.2.2\",",[2045],{"name":2046,"color":2047},"v0","4137F6",293,"tests break for a component using typescript","2024-05-01T16:05:03Z","https://github.com/nuxt/test-utils/issues/293",0.6592566,{"labels":2054,"number":2056,"owner":1985,"repository":1985,"state":1999,"title":2057,"updated_at":2058,"url":2059,"score":2060},[2055],{"name":1996,"color":1997},5164,"Cannot read property $loading of undefined when using jest with nuxt component","2023-01-18T20:10:44Z","https://github.com/nuxt/nuxt/issues/5164",0.66930425,{"description":2062,"labels":2063,"number":2064,"owner":1985,"repository":2008,"state":1999,"title":2065,"updated_at":2066,"url":2067,"score":2068},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-5c4p72?file=test/default.test.ts\n\n### Describe the bug\n\n`@nuxt/test-utils` doesn't work with `jest` if one is to set it up in a way that Nuxt 3 documentation recommends (https://nuxt.com/docs/getting-started/testing#setup):\r\n\r\n```\r\n ● Test suite failed to run\r\n\r\n Returning a Promise from \"describe\" is not supported. Tests must be defined synchronously.\r\n\r\n 1 | import { setup } from '@nuxt/test-utils';\r\n 2 |\r\n > 3 | describe('Smoke test (default)', async () => {\r\n | ^\r\n 4 | await setup({});\r\n 5 |\r\n 6 | test('it goes well', async () => {\r\n\r\n at ErrorWithStack (node_modules/jest-util/build/ErrorWithStack.js:23:13)\r\n at Object.\u003Canonymous> (test/default.test.ts:3:9)\r\n at [object Object]\r\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[],347,"Using `@nuxt/test-utils` with `jest` results in `Returning a Promise from \"describe\" is not supported`","2023-12-02T00:23:10Z","https://github.com/nuxt/test-utils/issues/347",0.6704662,["Reactive",2070],{},["Set"],["ShallowReactive",2073],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"OG_UPTdoH2C_ZIfNRX0OEFTneZ9OVWhleA3awpnKgRE":-1},"/nuxt/test-utils/478"]