-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking βSign up for GitHubβ, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctx.nuxt does not exist when build: false in setup #936
Conversation
Thank You so much for this @Al-Rozhkov. I've been wondering why I've unable to run my tests for a while without any luck. @danielroe any chance this gets reviewed soon? Many thanks ππ½ |
Would you be able to add a test in |
Thank you π Can you explain a bit about why you would do this rather than passing that config to setup? |
I wasn't sure how to build Nuxt manually and make setup use exact that build. I would appreciate your advice. Also not sure why windows tests failed. |
Maybe this helps The dudes and I want to reduce the setup times for playwright testrunners. Since on every test the app makes a new prod build, very time consuming. So we tried this config in the playwright.config.ts export default defineConfig<ConfigOptions>({
use: {
nuxt: {
build: false,
buildDir: '.output',
nuxtConfig: {
nitro: {
output: {
dir: '.output',
},
},
},
rootDir: fileURLToPath(new URL('.', import.meta.url)),
},
}) with that we get this errror Maybe this is the wrong approach, i dont know. Setting the Timeout of each test to 2 minutes a workaround but far from effective. If we could reduce the build to one, it would be very helpful. I have to build the frontend in the CI anyway before I copy it to the server, so it would make sense if the testrunner could use this artifact. |
π Linked issue
Resolves #918
resolves #995
β Type of change
π Description