TypeError: Cannot read properties of undefined (reading 'options')
at startServer (/project/workspace/node_modules/@nuxt/test-utils/dist/shared/test-utils.BHdilg2X.mjs:119:27)
at Object.setup2 (/project/workspace/node_modules/@nuxt/test-utils/dist/shared/test-utils.B9x0-cXO.mjs:179:7)
at Object.test$1.extend._nuxtHooks.scope (/project/workspace/node_modules/@nuxt/test-utils/dist/playwright.mjs:22:7)
It used to work with ctx.nuxt.options but I recently upgraded to the latest @nuxt/test-utils and I started seing this. The reproduction testifies of this new issue that I have. Maybe I am misusing the use:{nuxt:{} option?
If you run
yarn run test:e2e
in the following reproduction, you'll get this errorThe
nuxt
config from the use property is not accessible using the current pathctx.nuxt.options
: https://github.com/nuxt/test-utils/blob/df8f6c862f1f8d77097733f13b00f236778c9b56/src/core/server.ts#L62 but works usingctx.options.nuxtConfig
instead.It used to work with
ctx.nuxt.options
but I recently upgraded to the latest @nuxt/test-utils and I started seing this. The reproduction testifies of this new issue that I have. Maybe I am misusing theuse:{nuxt:{}
option?