test: add cli e2e snapshots#35
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a dedicated end-to-end (E2E) test suite for the spm CLI using Rstest snapshots, and wires it into the repository’s test workflows so the built CLI output/behavior is validated at a product level.
Changes:
- Introduces a separate
rstest.e2e.config.tsandpnpmscripts to run CLI E2E tests (optionally after building). - Adds E2E test cases that execute the built
packages/skills-package-manager/bin/spm.jsand snapshotstatus,stdout, andstderrfor key commands and error paths. - Extends Biome coverage to
e2e/**and runs E2E tests in CI after the build + existing test suite.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rstest.e2e.config.ts | Adds a dedicated Rstest configuration for E2E CLI tests. |
| package.json | Adds test:e2e / test:e2e:run scripts for running the E2E suite. |
| e2e/helpers/cli.ts | Adds helpers to run the built spm bin and normalize output for snapshots. |
| e2e/cases/help-version.test.ts | Adds E2E coverage for --help and --version. |
| e2e/cases/init.test.ts | Adds E2E coverage for init success and “manifest exists” failure. |
| e2e/cases/add.test.ts | Adds E2E coverage for add list flow and agent install/link flow. |
| e2e/cases/install.test.ts | Adds E2E coverage for install of linked skills and missing-manifest no-op. |
| e2e/cases/update.test.ts | Adds E2E coverage for update skipping link specifiers and unknown targets. |
| e2e/cases/patch.test.ts | Adds E2E coverage for patch and patch-commit flows. |
| e2e/cases/errors.test.ts | Adds E2E coverage for unknown command and missing required args. |
| e2e/cases/snapshots/*.snap | Adds snapshot baselines for all E2E cases. |
| biome.json | Includes e2e/** in Biome’s file includes. |
| .github/workflows/test.yml | Runs the E2E suite in CI after build + unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ef5ceb365
ℹ️ 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".
Summary
spmbin and snapshot terminalstatus,stdout, andstderr.Related Links
N/A
Checklist
Testing:
pnpm run test:e2epnpm run test:e2e:runpnpm testpnpm exec biome check e2e rstest.e2e.config.ts package.json biome.json .github/workflows/test.ymlNote: full
pnpm checkstill reports pre-existing unrelated Biome findings inpackages/skills-package-manager/src/npm/packPackage.ts,packages/skills-package-manager/src/pipeline/queue.ts, andwebsite/theme/components/HomePage/index.css.