Repository navigation
test(create-ngp): run the app template's spec on jsdom and in chromium under vp test - #137
Merged
Merged
Conversation
ChristopherPHolder
force-pushed
the
test/vite-plus-browser-nx
branch
from
December 4, 2026 04:36
282f9aa to
3d515f3
Compare
ChristopherPHolder
force-pushed
the
test/vite-plus-browser-nx
branch
from
December 4, 2026 04:38
3d515f3 to
165c1a0
Compare
…m under vp test Under Vite+ the provider comes from vite-plus/test/browser-playwright, at the Vitest version Vite+ bundles. The Vite+ page documents that setup, what one app in an Nx workspace does under Vite+, and moves vp pack out of its limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChristopherPHolder
force-pushed
the
test/vite-plus-browser-nx
branch
from
December 4, 2026 04:47
165c1a0 to
22f0296
Compare
Collaborator
Author
|
LGTM. Checked: the new test reuses the already-migrated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #133.
What changed
packages/create-ngp/test/app.test.mjsgets one new test after the existing Vite+ run of theapptemplate. It reuses that migrated app and does what a user would:vp add -D jsdom @vitest/browser-playwright playwright, then writes avitest.config.tswith ajsdomproject and abrowser(Chromium) project and runsvp test run. It asserts that the spec passed in both projects, then runsvp check. Versions:@vitest/browser-playwrightuses the Vitest that Vite+ bundles (read fromvite-plus/package.json, 5.1.0 in 1.6.0).playwrightandjsdomuse the playground's versions, so the app uses the Chromium CI already downloads for the playground's browser project. No new CI step, only a comment inci.yml.vite-plus.md: new section Specs on jsdom and in a browser. Under Vite+ the setup file imports fromvite-plus/testand the provider fromvite-plus/test/browser-playwright; the section also says whatvp migratedoes to an app that already has these setups. New section In an Nx workspace. The toolchain table now mentions jsdom and browser mode, andvp packmoves out of Limits into a table row that points to Status. The Limits bullet shrinks to "an Nx workspace with libraries".testing.md: one pointer each in the jsdom and browser-mode setups.status.md: the Vite+ row.nx.md: its claim that@nx/vite's target inference is untested is no longer true, so I corrected it.How it was verified
Vite+ 1.6.0, macOS, Node 26.
node --test test/app.test.mjs, under the shared lock): 5/5 pass. The new test took 4.6 s (4.8 s on a second run), on top of 11.4 s and 12.9 s for the two existing Vite+ tests:appaftervp migrate: a probe spec confirmed where each mode runs. Browser mode reportedHeadlessChrome/158andngServerMode false; jsdom reportedjsdom/30.1.2.vp migrateon an app that already had the Testing page's three projects (server, jsdom, browser with@vitest/browser-playwright@5.0.4): migrate rewrote the import tovite-plus/test/browser-playwrightand moved the provider andvitestto 5.1.0 in the catalog.vp checkpassed, and so did all three projects undervp test run. With the provider left at 5.0.4 the spec still passes, but pnpm reports a peer issue.create-nx-workspace --preset=apps --pm=pnpm) with@nx/viteand@nx/vitest, and theapptemplate underpackages/web, thenvp migrateat the root.nx build,nx testandnx servework.vp migrate, these work:vp build,vp testandvp devin the app,vp run -r build,vp checkafter--fix,nx build,nx test,nx dev, andnx run @org/web:test-ci--src/app/app.spec.ts. A template error fails bothvp buildandnx buildwith TS2551.nx servefails with/bin/sh: vite: command not found:@nx/viteinfers it as the commandvite, and@voidzero-dev/vite-plus-corehas novitebin. Adding"serve": "vp dev"to the app's scripts fixes it (verified). Documented, not worked around in the plugin.buildnortest(the template's package.json scripts win over the inferred targets, and scripts aren't cached unlesstargetDefaultssays so; verified thatcache: truegives 1/1 hits).@nx/js's inferredtypecheckfails with TS5069 on the template's tsconfigs.pnpm docs:checkpasses (16 options, 18 pages, 415 links).pnpm site:buildpasses.Left open
@nx/vite's executors haven't been tried either.🤖 Generated with Claude Code