test(scripts): restore pnpm test as the full gate - #2376
Conversation
…uite voidzero-dev#2146 removed the legacy snapshot infrastructure and trimmed the test script down to `vp test run`, leaving it identical to test:unit. Restore the historical two-tier semantics with the current PTY suite: pnpm test now runs the unit tests followed by `just snapshot-test`, while test:unit stays unit-only. The Alpine musl E2E job switches to pnpm test:unit because its container has no just or cargo (the legacy `pnpm -r snap-test` was node-only, which is why pnpm test used to work there). The upgrade-deps final validation folds its separate `just snapshot-test` step into the `pnpm test` step so the suite is not run twice.
Use pnpm test:unit in the final-validation gate instead of folding the snapshot suite into pnpm test. The agent re-records snapshot drift with UPDATE_SNAPSHOTS=1 just snapshot-test and re-runs only that step, so a combined gate would re-run the unit tests on every snapshot iteration and blur which suite failed.
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aaacade507
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The vitest_browser_mode case launches Chromium with PLAYWRIGHT_BROWSERS_PATH=0, which only the dedicated CI snapshot jobs provisioned. Now that pnpm test reaches the suite on a fresh checkout, snapshot-test installs the browser itself (idempotent, per-platform helper because the Windows shell is PowerShell).
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
pnpm testandpnpm test:unithave been identical (vp test run) since #2146 removed the legacy JS snapshot infrastructure and trimmed the snapshot half off thetestscript. Instead of deleting one of the duplicate scripts, this PR makespnpm testa single convenient command that runs the whole test surface.pnpm testnow runsvp test run && just snapshot-test(unit tests, then the PTY snapshot suite).pnpm test:unitstays unit-only.This also makes the pre-merge guidance in
CONTRIBUTING.mdandAGENTS.md(pnpm bootstrap-cli && pnpm test && git status, described as full validation) match what the command actually covers.CI adjustments
ci.yml): switched topnpm test:unitbecause the container has nojustor cargo to run the PTY suite. That coverage stays with the dedicatedcli-snapshot-testjobs.upgrade-deps.yml): step 2 now runspnpm test:unit, keepingjust snapshot-testas a separate step so a snapshot re-record does not re-run the unit tests.