` and it is also unclear how to import `NuxtIcon` into the test file since we use `\u003CIcon/>` in the markup. Can you please show me how to write tests when using nuxt/icon ?\r\n\r\nI've created a reproduction setup, after installing all deps it will auto start the test and you will see the error.\r\n\r\n\r\nhttps://stackblitz.com/edit/nuxt-vitest-iocqwn\r\n\r\nBest regards",[],197,"icon","[QUESTION] How to write tests for components that use @nuxt/icon","2024-08-20T13:54:55Z","https://github.com/nuxt/icon/issues/197",0.6983776,{"description":2978,"labels":2979,"number":2982,"owner":2911,"repository":2927,"state":2928,"title":2983,"updated_at":2984,"url":2985,"score":2986},"### Description\n\nHi,\n\nI just tried upgrading to `v3` but I noticed that the `Meter` component is unfortunately missing in this version and the migration guide also doesn't mention anything regarding that component which currently prevents me from upgrading to v3 . [This issue](https://github.com/nuxt/ui/issues/1841) mentions that the component was still pending migration at some point in the beginning of 2024 besides some other components.\n\nIs the meter component still expected to arrive in v3 sometime soon? It would be quite unfortunate if this handy component would be stripped out of NuxtUI.\n",[2980,2981],{"name":2961,"color":2962},{"name":2924,"color":2925},3808,"Meter component missing in v3","2025-04-08T17:16:45Z","https://github.com/nuxt/ui/issues/3808",0.70824546,{"description":2988,"labels":2989,"number":2993,"owner":2911,"repository":2911,"state":2928,"title":2994,"updated_at":2995,"url":2996,"score":2997},"Can not figure out and find right solution. Everything not work.\r\n\r\nAfter authentication, i need to save data not only to Store and to localStorage, but also synchronize everything. That after page reload, user will be authed.\r\n\r\nnuxt.conf\r\n```\r\n plugins: [\r\n { src: '~/plugins/localStorage', ssr: false }\r\n ],\r\n\r\n```\r\nlocalStorage.js\r\n```\r\nimport createPersistedState from 'vuex-persistedstate'\r\n\r\nexport default ({store}) => {\r\n createPersistedState({\r\n storage: {\r\n getItem: key => localStorage.getItem(key),\r\n setItem: (key, value) => localStorage.setItem(key, value),\r\n removeItem: key => localStorage.removeItem(key)\r\n }\r\n })\r\n}\r\n\r\n```\r\n\r\nexample.vue component\r\n```\r\n import MyPlugin from '~/plugins/localStorage'\r\n\r\n export default {\r\n created() {\r\n console.log(MyPlugin);\r\n console.log(MyPlugin.local);\r\n console.log(MyPlugin.setting);\r\n// console.log(MyPlugin.storage.getItem('token'));\r\n// console.log(MyPlugin.getItem('token'));\r\n\r\n console.log(this.$store.local);\r\n console.log(this.$store.setting);\r\n },\r\n```\r\n\r\nNothing works\r\n`[HMR] connected\r\nform.vue?385a:89 ƒ (_ref) {\r\n var store = _ref.store;\r\n\r\n Object(__WEBPACK_IMPORTED_MODULE_0_vuex_persistedstate__[\"a\" /* default */])({\r\n storage: {\r\n getItem: function getItem(key) {\r\n …\r\nform.vue?385a:90 undefined\r\nform.vue?385a:91 undefined\r\nform.vue?385a:95 undefined\r\nform.vue?385a:96 undefined`\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/c2625\">#c2625\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2990],{"name":2991,"color":2992},"2.x","d4c5f9",3031,"Persistedstate LocalStorage not work.","2023-01-18T16:09:51Z","https://github.com/nuxt/nuxt/issues/3031",0.7104014,{"description":2999,"labels":3000,"number":3001,"owner":2911,"repository":2939,"state":2928,"title":3002,"updated_at":3003,"url":3004,"score":3005},"",[],1129,"[Refactor] Harmonize props","2023-02-15T12:31:10Z","https://github.com/nuxt/nuxt.com/issues/1129",0.7114958,{"description":3007,"labels":3008,"number":3001,"owner":2911,"repository":2953,"state":2928,"title":3011,"updated_at":3012,"url":3013,"score":3005},"### Environment\n\n- Operating System: `Linux`\n- Node Version: `v23.5.0`\n- Nuxt Version: `3.15.4`\n- CLI Version: `3.21.1`\n- Nitro Version: `2.10.4`\n- Package Manager: `pnpm@9.15.5`\n- Builder: `-`\n- User Config: `-`\n- Runtime Modules: `-`\n- Build Modules: `-`\n\n\n### Reproduction\n\nhttps://github.com/nuxt/test-utils/pull/1128\n\n### Describe the bug\n\nwhen not using vitest globals and importing and using `vi` and `mockNuxtImport` vitest 3 fails with:\n\n```\nError: [vitest] There was an error when mocking a module. If you are using \"vi.mock\" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock\nCaused by: TypeError: Cannot read properties of undefined\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3009],{"name":2908,"color":3010},"5D08F5","BUG | vitest v3 | `There was an error when mocking a module` when `mockNuxtImport` with existing `vi` import","2025-02-20T15:35:27Z","https://github.com/nuxt/test-utils/issues/1129",["Reactive",3015],{},["Set"],["ShallowReactive",3018],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fw2T0PixsrsvW-o24oEdqJeo3fUNRlJNvtzDbZBN2EtM":-1},"/nuxt/nuxt.com/1504"]