\")\r\n})\r\n```\r\n\r\n```bash\r\nTypeError: Cannot read properties of undefined (reading 'completed')\r\n ❯ Proxy._sfc_render components/ToDo.vue:2:28\r\n 1| \u003Ctemplate>\r\n 2| \u003Cdiv :class=\"`task ${task.completed ? 'is-complete' : ''}`\">\r\n | ^\r\n 3| \u003Cdiv class=\"content\">{{ task.title }}\u003C/div>\r\n 4| \u003Cdiv class=\"buttons\">\r\n ❯ Proxy.clonedComponent.render node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs:142:37\r\n ❯ renderComponentRoot node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6246:16\r\n ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4921:46\r\n ❯ ReactiveEffect.run node_modules/@vue/reactivity/dist/reactivity.cjs.js:181:19\r\n ❯ instance.update node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5052:16\r\n ❯ setupRenderEffect node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5062:5\r\n ❯ mountComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4830:7\r\n ❯ processComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4784:9\r\n ❯ patch node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4313:11\r\n\r\nThis error originated in \"tests/components/ToDo.vue.test.js\" 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 \"can mount todo component\". It might mean one of the following:\r\n- The error was thrown, while Vitest was running this test.\r\n- If the error occurred after the test had been completed, this was the last documented test before it was thrown.\r\n```\r\nI have tried various things along this line of thought from various scraps of information I can find on blogs and stack overflow but at least 50% of it is for nuxt2 and out of date.\r\n\r\n### Describe the bug\r\n\r\nI would expect a mature framework to have better unit test examples and especially a simple unit test of a simple view component with a data prop\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2035,2038],{"name":2036,"color":2037},"documentation","5319e7",{"name":2039,"color":2040},"good first issue","fbca04",28346,"No documentation on how to unit test a simple component with data prop","2024-08-08T09:54:58Z","https://github.com/nuxt/nuxt/issues/28346",0.6832693,{"description":2047,"labels":2048,"number":2054,"owner":1988,"repository":1988,"state":2003,"title":2055,"updated_at":2056,"url":2057,"score":2058},"### Environment\r\n\r\nNuxt project info: 17:40:50\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `telemetry`, `runtimeConfig`, `css`, `build`, `vite`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\r\n\r\n### Reproduction\r\n\r\nuse useFetch then watch, in watch affet a boolean in a useState command, then in a component try to use the value in v-if statement => note working\r\n\r\nindex.vue (or any name)\r\n\r\n```\r\n\u003Ctemplate>\r\n\t\u003Cdiv>\r\n\t\t\u003Cbutton @click='onSubmit'>CLICK\u003C/button>\r\n\t\u003C/div>\r\n\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\" setup>\r\n\r\n\tfunction onSubmit() {\r\n\r\n\t\tconst {data: status} = useFetch('https://httpbin.org/get')\r\n\r\n\t\twatch(status, (newStatus) => {\r\n\r\n\t\t\tconsole.log('call ok')\r\n\r\n\t\t\t\tif(newStatus){\r\n\t\t\t\t\tuseState('test', ()=>'test');\r\n useState('isConnected', ()=>true);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t},{\r\n\t\t\t\tdeep: true,\r\n\t\t\t\timmediate:true\r\n\t\t\t}\r\n\t\t)\r\n\r\n}\r\n\r\n\u003C/script>\r\n```\r\nin component (Menu.vue)\r\n\r\n```\r\n\u003Ctemplate>\r\n\t\u003Cdiv>\r\n\t\t\t\t\u003CNuxtLink to=\"/\" src>\r\n\t\t\t\t\tHOME\r\n\t\t\t\t\u003C/NuxtLink>\r\n\u003Cdiv>\r\n\t\t\t{{test}} {{isConnected}} Application des commandes\r\n\r\n\u003C/div>\r\n\r\n\t\t\t\t\u003Cbutton v-if=\"isConnected\" @onclick=\"logout()\">LOGOUT\u003C/button>\r\n\t\t\t\t\u003Cbutton v-else href=\"/login\">LOGIN\u003C/button>\r\n\r\n\t\u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript script=\"ts\" setup>\r\n\r\nconst isConnected = useState('isConnected');\r\nconst test = useState( 'test' );\r\nconsole.log( isConnected );\r\n\r\n\u003C/script>\r\n\r\n```\r\n\r\nthen just create a default layout pu menu into and \r\n\r\n### Describe the bug\r\n\r\nWhen we click on button , on the menu in the vif part nothing happen, if we delete the watch part, it will work\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell\r\nno error only my log write the object\r\n\r\nisConnected? 12:47:30\r\nObjectRefImpl { 12:47:30\r\n _object: {},\r\n _key: '$sisConnected',\r\n _defaultValue: undefined,\r\n __v_isRef: true\r\n}\r\n```\r\n",[2049,2050,2051],{"name":2012,"color":2013},{"name":1985,"color":1998},{"name":2052,"color":2053},"needs reproduction","FBCA04",15575,"useState not working with v-if when value set in watch statement","2023-01-19T17:55:43Z","https://github.com/nuxt/nuxt/issues/15575",0.6868371,{"labels":2060,"number":2063,"owner":1988,"repository":1988,"state":2003,"title":2064,"updated_at":2065,"url":2066,"score":2067},[2061,2062],{"name":2012,"color":2013},{"name":1985,"color":1998},14068,"Error thrown `nuxt instance unavailable`, when use `useState` after `useFetch` in composable","2023-04-14T15:53:02Z","https://github.com/nuxt/nuxt/issues/14068",0.6894179,{"labels":2069,"number":2072,"owner":1988,"repository":1988,"state":2003,"title":2073,"updated_at":2074,"url":2075,"score":2076},[2070,2071],{"name":2012,"color":2013},{"name":1985,"color":1998},12759,"State not work with methods/functions","2023-01-19T16:21:28Z","https://github.com/nuxt/nuxt/issues/12759",0.6899317,{"labels":2078,"number":2081,"owner":1988,"repository":1988,"state":2003,"title":2082,"updated_at":2083,"url":2084,"score":2085},[2079,2080],{"name":2012,"color":2013},{"name":1985,"color":1998},13890,"useHead cannot be used in async functions","2023-01-19T17:13:42Z","https://github.com/nuxt/nuxt/issues/13890",0.69339037,{"description":2087,"labels":2088,"number":2091,"owner":1988,"repository":1988,"state":2003,"title":2092,"updated_at":2093,"url":2094,"score":2095},"### Environment\r\n\r\n{\r\n \"name\": \"nuxt-app\",\r\n \"private\": true,\r\n \"type\": \"module\",\r\n \"scripts\": {\r\n \"build\": \"nuxt build\",\r\n \"dev\": \"nuxt dev\",\r\n \"generate\": \"nuxt generate\",\r\n \"preview\": \"nuxt preview\",\r\n \"postinstall\": \"nuxt prepare\"\r\n },\r\n \"dependencies\": {\r\n \"@ant-design-vue/nuxt\": \"^1.4.1\",\r\n \"@nuxt/ui-pro\": \"^1.2.0\",\r\n \"@pinia-plugin-persistedstate/nuxt\": \"^1.2.0\",\r\n \"@element-plus/nuxt\": \"^1.0.9\",\r\n \"element-plus\": \"^2.7.3\",\r\n \"@pinia/nuxt\": \"^0.5.1\",\r\n \"ant-design-vue\": \"^4.2.1\",\r\n \"nuxt\": \"^3.11.2\",\r\n \"vue\": \"^3.4.27\",\r\n \"vue-router\": \"^4.3.2\",\r\n \"dayjs-nuxt\": \"^2.1.9\",\r\n \"@nuxtjs/device\": \"^3.1.1\",\r\n \"@vueuse/nuxt\": \"^10.9.0\",\r\n \"jwt-decode\": \"^4.0.0\"\r\n }\r\n}\r\n\r\n\r\n### Reproduction\r\nhttps://stackblitz.com/edit/github-hn5jfw?file=components%2Ftest.vue\r\nIf defineExpose is before useFetch, there will be no error, but it cannot expose refresh?\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Describe the bug\r\nhttps://stackblitz.com/edit/github-hn5jfw?file=components%2Ftest.vue\r\nIf defineExpose is before useFetch, there will be no error, but it cannot expose refresh?\r\n\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_",[2089,2090],{"name":2012,"color":2013},{"name":1985,"color":1998},27367,"Can't define Expose be used after the request?","2024-05-27T08:09:55Z","https://github.com/nuxt/nuxt/issues/27367",0.6945149,["Reactive",2097],{},["Set"],["ShallowReactive",2100],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"vCbjePo-fhcE9JQr4nYfvANbiBi_jbSEvTCoJlRHcGs":-1},"/nuxt/test-utils/337"]