Skip to content

test(scripts): restore pnpm test as the full gate - #2376

Draft
jong-kyung wants to merge 4 commits into
voidzero-dev:mainfrom
jong-kyung:test-script-full-gate
Draft

test(scripts): restore pnpm test as the full gate#2376
jong-kyung wants to merge 4 commits into
voidzero-dev:mainfrom
jong-kyung:test-script-full-gate

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

pnpm test and pnpm test:unit have been identical (vp test run) since #2146 removed the legacy JS snapshot infrastructure and trimmed the snapshot half off the test script. Instead of deleting one of the duplicate scripts, this PR makes pnpm test a single convenient command that runs the whole test surface.

  • pnpm test now runs vp test run && just snapshot-test (unit tests, then the PTY snapshot suite).
  • pnpm test:unit stays unit-only.

This also makes the pre-merge guidance in CONTRIBUTING.md and AGENTS.md (pnpm bootstrap-cli && pnpm test && git status, described as full validation) match what the command actually covers.

CI adjustments

  • Alpine musl E2E job (ci.yml): switched to pnpm test:unit because the container has no just or cargo to run the PTY suite. That coverage stays with the dedicated cli-snapshot-test jobs.
  • upgrade-deps final validation (upgrade-deps.yml): step 2 now runs pnpm test:unit, keeping just snapshot-test as a separate step so a snapshot re-record does not re-run the unit tests.

…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.
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 0f81e93
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7604c4bd703a000854c647

@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@jong-kyung jong-kyung self-assigned this Aug 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread package.json
"tsgo": "tsgo -b tsconfig.json",
"lint": "vp lint --type-aware --type-check --threads 4",
"test": "vp test run",
"test": "vp test run && just snapshot-test",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Provision Chromium before adding snapshots to pnpm test

On a fresh checkout following the documented just init and pnpm bootstrap-cli setup, this newly added command reaches the vitest_browser_mode snapshot case, which sets PLAYWRIGHT_BROWSERS_PATH=0 and launches Chromium, but neither setup command installs that browser. The dedicated snapshot jobs in .github/workflows/ci.yml explicitly run pnpm exec playwright install chromium with the same environment setting, so the documented full-validation command now fails for contributors unless they discover and perform this extra installation; provision Chromium during setup/the test script or otherwise make the browser case available to this gate.

AGENTS.md reference: AGENTS.md:L125-L125

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a valid. I still think a single command that runs the whole test suite is worth having, so I'd like to address this by adding a playwright install chromium step to the snapshot-test recipe in the justfile. @fengmk2 what do you think?

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.

1 participant