`\n\nUnable to use stroke-width does not take effect",[],364,"icon","Unable to use stroke-width does not take effect","2025-03-04T02:48:19Z","https://github.com/nuxt/icon/issues/364",0.7730367,{"description":2014,"labels":2015,"number":2016,"owner":1997,"repository":2017,"state":2018,"title":2019,"updated_at":2020,"url":2021,"score":2022},"https://github.com/nuxt-community/laravel-echo-module/blob/main/test/basic.test.ts#L12",[],390,"test-utils","closed","renderAndGetWindow type not found","2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/390",0.7053799,{"description":2024,"labels":2025,"number":2030,"owner":1997,"repository":1998,"state":2018,"title":2031,"updated_at":2032,"url":2033,"score":2034},"### Description\n\nRight now there is no aria-* attributes in form inputs, that should be required to meet wcag aa:\n- associate form label elements with controls: id on the input and label-for in the label referencing the input id\n- aria-describedby for messages and errors on each form input\n- aria-invalid=\"true\" on each invalid form input (plus the aria-describedby referencing the error)\n- include form error recovery: via `Error alert, then focus`, `Errors on top` or `Inline errors`: I always use `Errors on top` + `Inline errors` (ui using inline errors)\n\nFor reference: https://webaim.org/techniques/formvalidation/\n\n\n### Additional context\n\n_No response_",[2026,2029],{"name":2027,"color":2028},"enhancement","a2eeef",{"name":1988,"color":1989},3111,"add a11y to form stuff","2025-01-25T13:14:07Z","https://github.com/nuxt/ui/issues/3111",0.71798056,{"description":2036,"labels":2037,"number":2040,"owner":1997,"repository":1998,"state":2018,"title":2041,"updated_at":2042,"url":2043,"score":2044},"",[2038,2039],{"name":1985,"color":1986},{"name":1988,"color":1989},2338,"[Tabs] Height shifts of 1px between `pill` and `link` variants","2024-10-28T09:49:02Z","https://github.com/nuxt/ui/issues/2338",0.73762995,{"description":2046,"labels":2047,"number":2051,"owner":1997,"repository":2017,"state":2018,"title":2052,"updated_at":2053,"url":2054,"score":2055},"I'm testing a page. And inside the unit test I'd like to access the setup state, so I can execute the `onSuccess` function.\r\nIt is possible but it seems a bit cumbersome, I understand I have to find the component because it's wrapped.\r\n\r\n```js\r\n\u003Ctemplate>\r\n \u003Cdiv>Example\u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup type=\"ts\">\r\nconst { data } = await useDetailData();\r\n\r\nfunction onSuccess() {\r\n window.dispatchEvent(new CustomEvent('success'));\r\n\u003C/script>\r\n```\r\n\r\nThis a unit test, as you can see it's difficult to access the setupState of the wrapped Componened passed to mountSuspended.\r\nOr is this already possible somehow? Else I'd be able to make a PR to expose the setupState for easier access.\r\n\r\n```js\r\nit('should dispatch success event', async () => {\r\n const wrapper = await mountSuspended(DetailPage); // name of file is [...slug].vue\r\n\r\n const spy = vi.spyOn(window, 'dispatchEvent');\r\n // this works\r\n const detailPageWrapper = wrapper.findComponent({ name: '[...slug]'}).componentVM._.setupState;\r\n \r\n // But i'd prefer to use something like this instead: \r\n const detailPageWrapper = wrapper.findComponent({ name: '[...slug]'}).vm\r\n // Or this\r\n wrapper.setupState.onSuccess();\r\n\r\n \r\n detailPageWrapper.onSuccess();\r\n\r\n expect(spy).toHaveBeenCalledWith(\r\n expect.objectContaining({ type: 'success' })\r\n );\r\n});\r\n",[2048],{"name":2049,"color":2050},"vitest-environment","b60205",616,"[mountSuspended] Easier access to setupState","2023-12-02T17:18:48Z","https://github.com/nuxt/test-utils/issues/616",0.74033,{"description":2057,"labels":2058,"number":2061,"owner":1997,"repository":2062,"state":2018,"title":2063,"updated_at":2064,"url":2065,"score":2066},"\n",[2059],{"name":1985,"color":2060},"ff281a",511,"nuxt.com","[Resources] Live events image on dark mode is broken","2023-02-15T12:32:28Z","https://github.com/nuxt/nuxt.com/issues/511",0.741607,{"description":2068,"labels":2069,"number":2061,"owner":1997,"repository":2017,"state":2018,"title":2071,"updated_at":2072,"url":2073,"score":2066},"**Something like:**\r\n\r\n**Inspired by**\r\nhttps://github.com/aaron-bond/better-comments\r\n\r\n",[2070],{"name":2049,"color":2050},"Add support for generating tests by comment","2023-12-02T00:27:09Z","https://github.com/nuxt/test-utils/issues/511",{"description":2075,"labels":2076,"number":2082,"owner":1997,"repository":2017,"state":2018,"title":2083,"updated_at":2084,"url":2085,"score":2086},"It would be preferable that the module use the protocol that is specified in either the vitest config or nuxt config.\r\n\r\nhttps://github.com/danielroe/nuxt-vitest/blob/178c11865380b0cadb4c4af196486ebba308d3a9/packages/nuxt-vitest/src/module.ts#L49\r\n\r\nThis is resulting in the dev tools being unable to show the proper page for the ui:\r\n\r\n\r\n",[2077,2078,2081],{"name":1985,"color":1986},{"name":2079,"color":2080},"good first issue","7057ff",{"name":2049,"color":2050},548,"devtools iframe not able to run in https","2023-12-05T15:29:38Z","https://github.com/nuxt/test-utils/issues/548",0.75058,{"description":2088,"labels":2089,"number":2095,"owner":1997,"repository":2017,"state":2018,"title":2096,"updated_at":2097,"url":2098,"score":2099},"### Environment\r\n\r\n\r\n**package.json**\r\n```\r\n{\r\n \"name\": \"z1-pnx-certportal\",\r\n \"private\": true,\r\n \"scripts\": {\r\n \"ci\": \"pnpm i --frozen-lockfile\",\r\n \"dev\": \"nuxt dev --dotenv .env.dev\",\r\n \"build:dev\": \"nuxt build --dotenv .env.dev\",\r\n \"build:staging\": \"nuxt build --dotenv .env.staging\",\r\n \"build:production\": \"nuxt build --dotenv .env.prod\",\r\n \"generate\": \"nuxt generate\",\r\n \"preview\": \"nuxt preview\",\r\n \"postinstall\": \"nuxt prepare\",\r\n \"lint:js\": \"eslint --ext \\\".ts,.vue\\\" --ignore-path .gitignore .\",\r\n \"lint:prettier\": \"prettier --check .\",\r\n \"lint\": \"pnpm lint:js && pnpm lint:prettier\",\r\n \"lintfix\": \"prettier --write --list-different . && pnpm lint:js --fix\",\r\n \"test\": \"vitest --run --reporter verbose --globals\",\r\n \"test:watch\": \"vitest --reporter verbose --globals\"\r\n },\r\n \"devDependencies\": {\r\n \"@nuxt/test-utils\": \"3.9.0\",\r\n \"@nuxtjs/eslint-config-typescript\": \"12.1.0\",\r\n \"@nuxtjs/i18n\": \"8.0.0-rc.4\",\r\n \"@nuxtjs/turnstile\": \"0.6.3\",\r\n \"@types/node\": \"20.10.5\",\r\n \"@types/node-forge\": \"1.3.10\",\r\n \"@types/vue-tel-input\": \"2.1.6\",\r\n \"@typescript-eslint/parser\": \"6.0.0\",\r\n \"@vueuse/core\": \"10.7.0\",\r\n \"@vueuse/nuxt\": \"10.7.0\",\r\n \"autoprefixer\": \"10.4.16\",\r\n \"eslint\": \"8.43.0\",\r\n \"eslint-config-prettier\": \"9.0.0\",\r\n \"eslint-plugin-prettier\": \"5.0.1\",\r\n \"eslint-plugin-vitest\": \"0.3.18\",\r\n \"happy-dom\": \"12.9.1\",\r\n \"libphonenumber-js\": \"1.10.52\",\r\n \"nuxt\": \"3.8.2\",\r\n \"postcss\": \"8.4.32\",\r\n \"prettier\": \"3.1.1\",\r\n \"sass\": \"1.69.5\",\r\n \"sass-loader\": \"13.3.2\",\r\n \"tailwindcss\": \"3.3.7\",\r\n \"typescript\": \"5.3.3\",\r\n \"vite-svg-loader\": \"5.0.1\",\r\n \"vitest\": \"1.0.4\",\r\n \"vitest-environment-nuxt\": \"^1.0.0\",\r\n \"vue-tel-input\": \"8.1.4\"\r\n },\r\n \"dependencies\": {\r\n \"@pinia/nuxt\": \"0.5.1\",\r\n \"@types/got\": \"9.6.12\",\r\n \"dotenv\": \"16.3.1\",\r\n \"got\": \"14.0.0\",\r\n \"hpagent\": \"1.2.0\",\r\n \"node-forge\": \"1.3.1\",\r\n \"pinia\": \"2.1.7\",\r\n \"print-js\": \"1.6.0\",\r\n \"vue\": \"3.3.12\"\r\n }\r\n}\r\n```\r\n\r\n**nuxt.config.ts**\r\n```\r\nexport default defineNuxtConfig({\r\n...\r\n modules: ['@vueuse/nuxt', '@nuxtjs/i18n', '@pinia/nuxt', '@nuxt/test-utils/module', '@nuxtjs/turnstile'],\r\n testUtils: {}\r\n })\r\n```\r\n \r\n **vitest.config.mjs**\r\n```\r\nimport { defineVitestConfig } from '@nuxt/test-utils/config'\r\n\r\nexport default defineVitestConfig({\r\n test: {\r\n environment: 'nuxt'\r\n }\r\n});\r\n```\r\n\r\n**turnstile.test.ts**\r\n\r\n```\r\nimport { it, describe, expect, vi, afterEach } from 'vitest';\r\nimport { mockNuxtImport } from '@nuxt/test-utils/runtime';\r\nimport mockTurnstileResponse from './mocks/mockTurnstileResponse';\r\nimport verifyResponse from './test-data/turnstile-verify-response.json';\r\nimport { validateTurnstileToken } from '@/composables/turnstile';\r\n\r\nmockNuxtImport('useFetch', () => {\r\n return (token:string) => mockTurnstileResponse(token);\r\n});\r\n\r\ndescribe('validateTurnstileToken', () => {\r\n afterEach(() => {\r\n vi.resetAllMocks();\r\n });\r\n\r\n it('should validate a token successfully', async () => {\r\n const result = await validateTurnstileToken('validToken');\r\n expect(result).toBe(verifyResponse);\r\n });\r\n\r\n it('should throw an error when token is not provided', async () => {\r\n await expect(validateTurnstileToken('')).rejects.toThrow('Token not provided.');\r\n });\r\n\r\n it('should throw an error when useFetch returns an error', async () => {\r\n const mockErrorMessage = '';\r\n mockTurnstileResponse.mockImplementation(_token => { return { data: { value: null }, error: { value: mockErrorMessage } }; });\r\n\r\n await expect(validateTurnstileToken('someToken')).rejects.toThrow(mockErrorMessage);\r\n });\r\n\r\n it('should throw an error for unexpected response from useFetch', async () => {\r\n mockTurnstileResponse.mockImplementation(_token => { return { data: { value: null }, error: { value: null } }; });\r\n\r\n await expect(validateTurnstileToken('unexpectedToken')).rejects.toThrow(\r\n 'Unexpected error: Response data and error are both undefined.'\r\n );\r\n });\r\n});\r\n```\r\n\r\n\r\n_EDIT add:_ \r\nmockTurnstileResponse.ts\r\n```\r\nimport { vi } from 'vitest';\r\nimport verifyResponse from '../test-data/turnstile-verify-response.json';\r\nimport type { MockTurnstileValidationResponse } from '@/composables/interfaces';\r\n\r\nconst mockTurnstileResponse = vi.fn((_token):MockTurnstileValidationResponse => {\r\n return {\r\n data: {\r\n value: verifyResponse\r\n },\r\n error: { value: null }\r\n };\r\n});\r\n```\r\n\r\n\r\n### Reproduction\r\n\r\n1. Migrate from nuxt-vitest to test-utils v3.9.0.\r\n2. Run tests using the command pnpm test.\r\nExpected Behavior\r\nTests should run successfully without any import resolution issues.\r\n\r\nActual Behavior\r\nEncountered an error during test execution with the mentioned import resolution problem.\r\n\r\n\u003Cimg width=\"984\" alt=\"Screenshot 2023-12-20 at 11 13 01\" src=\"https://github.com/nuxt/test-utils/assets/89916568/fb5f4df0-a855-4af7-862f-72821c2c2bb3\">migrating from nuxt-vitest to test-utils v3.9.0\r\n\r\n### Describe the bug\r\n\r\nAfter migrating from nuxt-vitest to test-utils v3.9.0, I encountered an error when running tests. The error message suggests a problem with resolving the @vue/test-utils import within the context of @nuxt/test-utils.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2090,2091,2092],{"name":1985,"color":1986},{"name":2049,"color":2050},{"name":2093,"color":2094},"needs reproduction","DE7793",667,"Error: Could not resolve \"@vue/test-utils\" imported by \"@nuxt/test-utils\". Is it installed?","2023-12-20T18:31:27Z","https://github.com/nuxt/test-utils/issues/667",0.7583663,["Reactive",2101],{},["Set"],["ShallowReactive",2104],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"ozSenjp9SyA3qGAjVzVTnYxWUINXuVoYByjk_2txAQ0":-1},"/nuxt/icon/324"]