\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.68061274,{"description":1993,"labels":1994,"number":1995,"owner":1985,"repository":1996,"state":1997,"title":1998,"updated_at":1999,"url":2000,"score":2001},"After I followed instruction to install @nuxt/test-utils, the preset is not found in jest. Here is a minimal reproduction.\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-mzh22b?file=package.json,jest.config.js,test%2Fexample.spec.js,README.md\r\n\r\npackage.json\r\n```\r\n{\r\n \"private\": true,\r\n \"scripts\": {\r\n \"build\": \"nuxt build\",\r\n \"dev\": \"HOST=0.0.0.0 nuxt dev\",\r\n \"generate\": \"nuxt generate\",\r\n \"preview\": \"nuxt preview\",\r\n \"postinstall\": \"nuxt prepare\",\r\n \"test\": \"jest\"\r\n },\r\n \"devDependencies\": {\r\n \"@nuxt/test-utils\": \"^3.4.2\",\r\n \"@types/node\": \"^18\",\r\n \"jest\": \"^28.1.3\",\r\n \"nuxt\": \"^3.4.2\"\r\n }\r\n}\r\n```\r\n\r\njest.config.js\r\n```\r\nmodule.exports = {\r\n preset: '@nuxt/test-utils',\r\n};\r\n```\r\n\r\nNot sure what happened here",[],400,"test-utils","closed","Preset @nuxt/test-utils not found with jest@28","2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/400",0.63748413,{"description":2003,"labels":2004,"number":2005,"owner":1985,"repository":1996,"state":1997,"title":2006,"updated_at":2007,"url":2008,"score":2009},"Trying to get the test-utils to work, but after adding the preset, JEST simply won't run, saying that the test utils cannot be found.\r\n\r\nThis is straight from the docs. I've tried a bunch of different versions, and simply cannot get them to work. This is required (I think) in order to get the global function calls (such as definePageMeta) to work in tests.\r\n\r\n> ● Validation Error:\r\n>\r\n> Preset @nuxt/test-utils not found.\r\n>\r\n> Configuration Documentation:\r\n> https://jestjs.io/docs/configuration.html\r\n\r\nThe test utils are installed.\r\n\r\nAny ideas?",[],280,"Preset @nuxt/test-utils not found.","2023-12-02T00:18:11Z","https://github.com/nuxt/test-utils/issues/280",0.64077455,{"description":2011,"labels":2012,"number":2019,"owner":1985,"repository":1985,"state":1997,"title":2020,"updated_at":2021,"url":2022,"score":2023},"### Version\n\n[v2.3.4](https://github.com/nuxt.js/releases/tag/v2.3.4)\n\n### Reproduction link\n\n[https://nuxtjs.org/](https://nuxtjs.org/)\n\n### Steps to reproduce\n\nRun: `yarn create nuxt-app project`\nChoose Linter and JestJs and SPA mode.\n\nWithout adding any additional content, run `yarn test`\n\n### What is expected ?\n\nI expect the default test to pass.\n\n### What is actually happening?\n\nI receive this error message:\n\n```\nyarn run v1.13.0\n$ jest\n FAIL test/Logo.spec.js\n ● Test suite failed to run\n\n Jest encountered an unexpected token\n\n This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.\n\n By default, if Jest sees a Babel config, it will use that to transform your files, ignoring \"node_modules\".\n\n Here's what you can do:\n • To have some of your \"node_modules\" files transformed, you can specify a custom \"transformIgnorePatterns\" in your config.\n • If you need a custom transformation specify a \"transform\" option in your config.\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.\n\n You'll find more details and examples of these config options in the docs:\n https://jestjs.io/docs/en/configuration.html\n\n Details:\n\n /home/begueradj/Development/project/test/Logo.spec.js:1\n ({\"Object.\u003Canonymous>\":function(module,exports,require,__dirname,__filename,global,jest){import { mount } from '@vue/test-utils';\n ^\n\n SyntaxError: Unexpected token {\n\n at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)\n\nTest Suites: 1 failed, 1 total\nTests: 0 total\nSnapshots: 0 total\nTime: 0.803s\nRan all test suites.\nerror Command failed with exit code 1.\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n```\n\n### Note\nThis occurs **only** when I move the content of project to an other folder where of course I remove `node_modes` and `.nuxt` folders.\n\nI **need** to copy the content of the generate folder to an other place because I am working with Git branches\n\n\n\n\u003C!--cmty-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This bug report is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c8573\">#c8573\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2013,2016],{"name":2014,"color":2015},"pending triage","E99695",{"name":2017,"color":2018},"2.x","d4c5f9",4899,"Default test does not pass","2023-01-22T15:30:09Z","https://github.com/nuxt/nuxt/issues/4899",0.6418715,{"description":2025,"labels":2026,"number":2031,"owner":1985,"repository":1985,"state":1997,"title":2032,"updated_at":2033,"url":2034,"score":2035},"Hi @Atinux and @eddyerburgh,\r\n\r\nThis is the first attempt to integrate Jest with Nuxt.js . I ran into couple of error related to `nuxt` library which I don't understand. It would be nice to have a look at the sample codebase here https://github.com/piyushchauhan2011/nuxt-with-jest .\r\n\r\nPros:\r\n\r\n- Was able to test store and sample `.js` files\r\n- I was also able to unit-test components\r\n- Snapshot testing\r\n\r\n\r\n\r\nBroken:\r\n\r\n- End to end testing\r\n\r\n```\r\n ERROR in ./.nuxt/client.js\r\n Module build failed: Error: Cannot find module '../../package' from 'node.js'\r\n at Resolver.resolveModule (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-resolve/build/index.js:179:17)\r\n at Resolver._getVirtualMockPath (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-resolve/build/index.js:296:23)\r\n at Resolver._getAbsolutPath (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-resolve/build/index.js:279:10)\r\n at Resolver.getModuleID (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-resolve/build/index.js:252:31)\r\n at Runtime._shouldMock (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-runtime/build/index.js:574:37)\r\n at Runtime.requireModuleOrMock (/Users/piyushchauhan/Documents/jirnexu/nuxt-with-jest/node_modules/jest-runtime/build/index.js:402:14)\r\n```\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This feature request is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c936\">#c936\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2027,2030],{"name":2028,"color":2029},"enhancement","8DEF37",{"name":2017,"color":2018},1075,"Attempting to integrate Jest with Nuxt.js","2023-01-18T15:40:44Z","https://github.com/nuxt/nuxt/issues/1075",0.6503999,{"description":2037,"labels":2038,"number":2042,"owner":1985,"repository":1996,"state":1997,"title":2043,"updated_at":2044,"url":2045,"score":2046},"When I tried to use the library I got this error: \r\n\r\n\r\nIf I only use jest or testing library they do work, I am quite confused. Any ideas?\r\n\r\nThis is my jest.config.js:\r\n```\r\nmodule.exports = {\r\n moduleNameMapper: {\r\n '^@/(.*)$': '\u003CrootDir>/$1',\r\n '^~/(.*)$': '\u003CrootDir>/$1',\r\n '^@atoms/(.*)$': '\u003CrootDir>/components/common/atoms/$1',\r\n '^@molecules/(.*)$': '\u003CrootDir>/components/common/molecules/$1',\r\n '^@organisms/(.*)$': '\u003CrootDir>/components/common/organisms/$1',\r\n '^@checkout/(.*)$': '\u003CrootDir>/components/private/checkout/$1',\r\n '^vue$': 'vue/dist/vue.common.js'\r\n },\r\n moduleFileExtensions: ['js', 'vue', 'json'],\r\n transform: {\r\n '^.+\\\\.js$': 'babel-jest',\r\n '.*\\\\.(vue)$': 'vue-jest'\r\n },\r\n collectCoverage: true,\r\n transformIgnorePatterns: [\r\n 'node_modules/(?!(nuxt-i18n)/)',\r\n 'node_modules/(?!(nuxt-webfontloader)/)',\r\n 'node_modules/(?!(nuxt-test-utils)/)'\r\n ],\r\n testEnvironment: 'jsdom',\r\n preset: '@nuxt/test-utils'\r\n}\r\n\r\n\r\n```\r\nThis is my package.json:\r\n```\r\n \"dependencies\": {\r\n \"@adyen/adyen-web\": \"^4.2.3\",\r\n \"@bugsnag/js\": \"^7.1.1\",\r\n \"@bugsnag/plugin-vue\": \"^7.1.1\",\r\n \"@nuxtjs/axios\": \"^5.3.6\",\r\n \"@nuxtjs/dayjs\": \"^1.3.0\",\r\n \"@nuxtjs/gtm\": \"^2.3.2\",\r\n \"@nuxtjs/pwa\": \"^3.3.5\",\r\n \"@nuxtjs/router\": \"^1.5.0\",\r\n \"@nuxtjs/svg-sprite\": \"^0.4.10\",\r\n \"@tailwindcss/aspect-ratio\": \"^0.2.0\",\r\n \"@tailwindcss/forms\": \"^0.3.2\",\r\n \"@tailwindcss/typography\": \"^0.4.0\",\r\n \"cookie-universal-nuxt\": \"^2.1.4\",\r\n \"core-js\": \"^2.6.0\",\r\n \"cross-env\": \"^5.2.0\",\r\n \"dotenv\": \"^8.2.0\",\r\n \"eslint-loader\": \"^4.0.2\",\r\n \"express\": \"^4.16.4\",\r\n \"jsdom\": \"^16.4.0\",\r\n \"lozad\": \"^1.15.0\",\r\n \"node-fetch\": \"^2.6.1\",\r\n \"nuxt\": \"2.15.4\",\r\n \"nuxt-feature-toggle\": \"^1.0.1\",\r\n \"nuxt-font-loader-strategy\": \"^1.1.1\",\r\n \"nuxt-i18n\": \"^6.15.4\",\r\n \"nuxt-jsonld\": \"^1.4.10\",\r\n \"nuxt-webfontloader\": \"^1.1.0\",\r\n \"v-click-outside\": \"^3.0.1\",\r\n \"v-clipboard\": \"^2.2.3\",\r\n \"vue-debounce\": \"^2.5.6\",\r\n \"vue-glide-js\": \"^1.3.14\",\r\n \"vue-gtm\": \"^2.3.1\",\r\n \"vue-slider-component\": \"^3.1.4\",\r\n \"vue-social-sharing\": \"^3.0.0-beta.11\",\r\n \"vue-toastification\": \"^1.7.6\",\r\n \"vue-vimeo-player\": \"^0.1.0\",\r\n \"vuelidate\": \"^0.7.5\"\r\n },\r\n \"devDependencies\": {\r\n \"@babel/core\": \"^7.7.7\",\r\n \"@babel/preset-env\": \"^7.15.0\",\r\n \"@babel/plugin-transform-runtime\": \"^7.15.0\",\r\n \"@nuxt/test-utils\": \"^0.2.2\",\r\n \"@nuxtjs/eslint-config\": \"^5.0.0\",\r\n \"@nuxtjs/eslint-module\": \"^3.0.1\",\r\n \"@nuxtjs/tailwindcss\": \"^4.1.2\",\r\n \"@testing-library/vue\": \"^5.8.2\",\r\n \"@vue/test-utils\": \"^1.1.2\",\r\n \"babel-eslint\": \"^10.0.1\",\r\n \"babel-jest\": \"26\",\r\n \"eslint\": \"^7.14.0\",\r\n \"eslint-config-prettier\": \"^6.15.0\",\r\n \"eslint-plugin-nuxt\": \"^2.0.0\",\r\n \"eslint-plugin-prettier\": \"^3.1.4\",\r\n \"jest\": \"26\",\r\n \"node-sass\": \"^4.14.1\",\r\n \"nodemon\": \"^1.18.9\",\r\n \"playwright\": \"^1.14.1\",\r\n \"postcss\": \"^8.2.9\",\r\n \"prettier\": \"^1.19.1\",\r\n \"sass-loader\": \"10.1.1\",\r\n \"vue-jest\": \"^4.0.0-rc.1\"\r\n }\r\n}\r\n```\r\n\r\n\r\nMy .babelrc: \r\n```\r\n{\r\n \"env\": {\r\n \"test\": {\r\n \"presets\": [\r\n [\r\n \"@babel/preset-env\",\r\n {\r\n \"targets\": {\r\n \"node\": \"current\"\r\n }\r\n }\r\n ]\r\n ]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\nI am trying to use this test: \r\n\r\n`import { createPage, setupTest } from '@nuxt/test-utils'`\r\n\r\n`describe('browser', () => {`\r\n `setupTest({ browser: true })`\r\n\r\n ` it('renders the index page', async () => {`\r\n ` const page = await createPage('/')`\r\n ` const html = await page.innerHTML('body')`\r\n\r\n ` expect(html).toContain('Something')`\r\n` })`\r\n`})`\r\n\r\n",[2039],{"name":2040,"color":2041},"v0","4137F6",320,"\"Cannot use import statement outside a module\" when i use setupTest","2024-05-23T20:19:27Z","https://github.com/nuxt/test-utils/issues/320",0.6601206,{"labels":2048,"number":2050,"owner":1985,"repository":1985,"state":1997,"title":2051,"updated_at":2052,"url":2053,"score":2054},[2049],{"name":2017,"color":2018},6626,"What is the best way to test routes on Nuxt with Jest?","2024-03-30T23:02:11Z","https://github.com/nuxt/nuxt/issues/6626",0.6628805,{"description":2056,"labels":2057,"number":2065,"owner":1985,"repository":1985,"state":1997,"title":2066,"updated_at":2067,"url":2068,"score":2069},"### Environment\n\n```\r\n- Operating System: `Darwin`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `yarn@1.22.11`\r\n- Builder: `vite`\r\n```\r\n\r\nThough I have also tested with rc 10, 8, 5, & 4\n\n### Reproduction\n\nThis is fairly short so ill avoid reproduction unless theres a strong need\r\n\r\nFrom a fresh Nuxt 3 Project:\r\n\r\n```json\r\n// package.json\r\n\r\n{\r\n \"scripts\": {\r\n ...\r\n \"build\": \"nuxt build\",\r\n \"test\": \"vitest run\"\r\n },\r\n \"devDependencies\": {\r\n \"nuxt\": \"3.0.0-rc.11\"\r\n },\r\n \"dependencies\": {\r\n \"@nuxt/test-utils\": \"3.0.0-rc.11\",\r\n \"vitest\": \"^0.23.4\"\r\n }\r\n}\r\n```\r\n\r\n```ts\r\n// vite.config.ts\r\n\r\nimport { defineConfig } from \"vitest/config\";\r\n\r\nexport default defineConfig({\r\n test: {\r\n globals: true,\r\n },\r\n});\r\n```\r\n\r\n```html\r\n// pages/index.vue\r\n\r\n\u003Ctemplate>\r\n \u003Ch1>Hello World!\u003C/h1>\r\n\u003C/template>\r\n```\r\n\r\n```ts\r\n// pages/index.spec.ts\r\n\r\nimport { describe, test, expect } from 'vitest'\r\nimport { setup, $fetch } from '@nuxt/test-utils'\r\n\r\ndescribe('My test', async () => {\r\n await setup({\r\n runner: 'vitest',\r\n })\r\n\r\n test('my test', () => {\r\n const html = $fetch('/')\r\n\r\n expect(html).toContain('Hello World!')\r\n })\r\n})\r\n```\n\n### Describe the bug\n\nDuring the `beforeAll` section of the `setup` in my test it crashes with this result:\r\n\r\n```\r\nError: [vite]: Rollup failed to resolve import \"jest\" from \"node_modules/@nuxt/test-utils/dist/index.mjs\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n```\r\n\r\nThis is strange since the runner is clearly `vitest`, so it shouldnt be trying to import jest.\r\n\r\nTook a brief look at the `index.mjs` and my `hooks.ctx.options.runner` is properly recieving `vitest`.\r\n\r\nThe error ends with:\r\n\r\n```\r\n Segmentfault Error Detected \r\n FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.\r\n Refer to https://github.com/nodejs/node/issues/42407\r\n```\n\n### Additional context\n\nI havent been able to find a solid working example to base my own code. I was hoping this issue was just the RC version that I was using, but so far I havent had any luck with changing it. \r\n\r\nI tried cloning the `nuxt-ionic` repository as I saw it was on a later RC version and using vitest, however even with that I ran into issues. Is there a good working example I can be pointed in the direction of?\n\n### Logs\n\n```shell\n$ vitest run\r\n\r\n RUN v0.23.4 /Users/*********************/test-utils\r\n\r\n ❯ pages/index.spec.ts (1)\r\n 1: 0x103ab6ef5 node::Abort() (.cold.1) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n ❯ pages/index.spec.ts (1) 4104ms\r\n ❯ My test (1) 4103ms\r\n ⠙ [ beforeAll ]\r\n · my test\r\n\r\n 2: 0x1027aa869 node::Abort() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 3: 0x1027aa9df node::OnFatalError(char const*, char const*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\n FAIL pages/index.spec.ts > My test\r\n 4: 0x10292ed00 v8::V8::ToLocalEmpty() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nError: [vite]: Rollup failed to resolve import \"jest\" from \"node_modules/@nuxt/test-utils/dist/index.mjs\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n ❯ onRollupWarning node_modules/vite/dist/node/chunks/dep-6b3a5aff.js:45908:19\r\n 5: 0x1027a596f node::fs::FSReqPromise\u003Cnode::AliasedBufferBase\u003Cdouble, v8::Float64Array, void> >::Resolve(v8::Local\u003Cv8::Value>) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n ❯ onwarn node_modules/vite/dist/node/chunks/dep-6b3a5aff.js:45706:13\r\n ❯ Object.onwarn node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:23225:13\r\n ❯ ModuleLoader.handleResolveId node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22352:26\r\n ❯ ModuleLoader.resolveDynamicImport node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22404:120\r\n ❯ async file:/Users/*********************/test-utils/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22299:32\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n 6: 0x1027afa40 node::fs::AfterStat(uv_fs_s*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 7: 0x103176598 uv__work_done [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 8: 0x10317b75b uv__async_io [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 9: 0x10318f54b uv__io_poll [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nSerialized Error: Object {\r\n \"watchFiles\": [Array],\r\n}\r\n10: 0x10317bce1 uv_run [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\r\n\r\n11: 0x1026dbf9f node::SpinEventLoop(node::Environment*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nTest Files 1 failed (1)\r\n Tests (1)\r\n12: 0x102852cae node::worker::Worker::Run() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n13: 0x1028566a2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo\u003Cv8::Value> const&)::$_3::__invoke(void*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n14: 0x7ff8042ef4e1 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]\r\n15: 0x7ff8042eaf6b thread_start [/usr/lib/system/libsystem_pthread.dylib]\r\n\r\n Segmentfault Error Detected \r\n FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.\r\n Refer to https://github.com/nodejs/node/issues/42407\r\n\r\nIt seems to be an upstream bug of Node.js. To improve the test stability,\r\nyou could pass --segfault-retry=3 or set env VITEST_SEGFAULT_RETRY=3 to\r\nhave Vitest auto retries on flaky segfaults.\r\n\r\nerror Command failed with exit code 1.\n```\n",[2058,2061,2062],{"name":2059,"color":2060},"3.x","29bc7f",{"name":2014,"color":2015},{"name":2063,"color":2064},"needs reproduction","FBCA04",15073,"Unable to get a running env with `nuxt/test-utils`","2023-01-19T17:44:36Z","https://github.com/nuxt/nuxt/issues/15073",0.6642613,{"labels":2071,"number":2074,"owner":1985,"repository":1985,"state":1997,"title":2075,"updated_at":2076,"url":2077,"score":2078},[2072,2073],{"name":2014,"color":2015},{"name":2017,"color":2018},6852,"Compatibility issue with Nuxt@2.11 and @vue/test-utils","2023-01-22T15:34:48Z","https://github.com/nuxt/nuxt/issues/6852",0.6677088,{"description":2080,"labels":2081,"number":2083,"owner":1985,"repository":1985,"state":1997,"title":2084,"updated_at":2085,"url":2086,"score":2087},"I'm trying to do testing integration with nuxt.js by following the guide/documentation on nuxt website. I also had a look in the example `with-ava` directory. But it seems to be using `0.9.x` package.\r\n\r\nThe error after running the `yarn test` is:\r\n\r\n```javascript\r\nPromise { \u003Cpending> }\r\n\r\n 1 failed\r\n\r\n Init Nuxt.js\r\n /Users/piyushchauhan/Documents/jirnexu/hello/test/index.test.js:19\r\n\r\n 18: console.log(nuxt)\r\n 19: await nuxt.build()\r\n 20: server = new nuxt.Server(nuxt)\r\n\r\n Rejected promise returned by test\r\n\r\n Rejection reason:\r\n\r\n [TypeError: nuxt.build is not a function]\r\n\r\n Test.\u003Canonymous> (test/index.test.js:19:14)\r\n step (test/index.test.js:18:191)\r\n Test.\u003Canonymous> (test/index.test.js:18:99)\r\n Test._ava2.default.before [as fn] (test/index.test.js:11:1)\r\n\r\nerror Command failed with exit code 1.\r\n```\r\n\r\nAre the methods like `build` and `Server`, `renderRoute` got removed from `Nuxt` ?\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/c671\">#c671\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2082],{"name":2017,"color":2018},784,"nuxt.js version 0.10.x problems with ava testing","2023-01-18T15:39:46Z","https://github.com/nuxt/nuxt/issues/784",0.66931075,["Reactive",2089],{},["Set"],["ShallowReactive",2092],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"tAiioXrPduUfg0R9AZeKF0m0Ao-QZ3_rS1Vh_JRyRMY":-1},"/nuxt/test-utils/335"]