Skip to content

Conversation

@mihkeleidast
Copy link
Contributor

Effectively does the same thing, but builds for playwright browser tests as a pre-step, so playwright won't have to wait for the build to succeed, rather just the webserver starting, which should be fast.

Lowered the timeout to the default value, but left it in the config, as it might still be useful to see/change later on.

@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 2, 2026 8:41pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 2, 2026 8:41pm
npmx-lunaria Ignored Ignored Feb 2, 2026 8:41pm

Request Review

"test": "vite test",
"test:browser": "playwright test",
"test:browser:ui": "playwright test --ui",
"test:browser:ui": "pnpm build:playwright && playwright test --ui",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also move it to a separate step in the CI workflow - that could give us more visibility into if/how the build time changes over time. But kept it here now so the local browser tests run would be the same DX, just run the same command.

"scripts": {
"build": "nuxt build",
"build:lunaria": "node ./lunaria/lunaria.ts",
"build:playwright": "NODE_ENV=test pnpm build",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure where the NODE_ENV matters, kept it for both for now

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't make any difference in CI but it does enable writing tests more easily locally - e.g you build server, then iterate on it with playwright.... so I think it's a good thing

thank you!: ❤️

@mihkeleidast
Copy link
Contributor Author

From what I understood is that the main issue currently is that playwright has to wait for the build to complete before running browser tests - this should affect CI positively in that regard, i.e. it doesn't matter if the build takes 1-2 minutes longer (depending on flakyness in CPU/memory availability for example), playwright only starts after the build completes, and only has to wait for the local webserver to start.

@danielroe
Copy link
Member

playwright has to wait for the build to finish one way or another - either before playwright starts, or as part of the playwright process - so this is the same as simply adding a very high timeout for that start command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants