Skip to content

Fix #324: add CLI integration test suite#327

Merged
roblevintennis merged 1 commit intomasterfrom
issue-324/cli-integration-tests
Mar 6, 2026
Merged

Fix #324: add CLI integration test suite#327
roblevintennis merged 1 commit intomasterfrom
issue-324/cli-integration-tests

Conversation

@roblevintennis
Copy link
Copy Markdown
Contributor

  • Add Vitest as devDependency; update npm test to run vitest run
  • Add vitest.config.ts with 30s timeout and test/ glob
  • Add test/helpers.ts: createTempDir, createMockTarball, createMockReferenceLibrary, createInitializedProject, MOCK_MANIFEST
  • Add test/init.test.ts: 6 tests covering config creation, CSS tokens, error paths, --force re-init
  • Add test/add.test.ts: 6 tests covering happy path, config recording, error paths
  • Add test/list.test.ts: 3 tests covering component listing and error paths
  • Add test/context.test.ts: 7 tests covering all output formats, splice-on-rerun, error paths
  • Add test/playbook.test.ts: 7 tests with mocked fetch for --list, install, and error paths
  • Add .github/workflows/cli-tests.yml: runs on push/PR to v2/cli/**
  • Use process.chdir() for test isolation; rely on Vitest's process.exit interception

- Add Vitest as devDependency; update `npm test` to run `vitest run`
- Add vitest.config.ts with 30s timeout and test/ glob
- Add test/helpers.ts: createTempDir, createMockTarball, createMockReferenceLibrary, createInitializedProject, MOCK_MANIFEST
- Add test/init.test.ts: 6 tests covering config creation, CSS tokens, error paths, --force re-init
- Add test/add.test.ts: 6 tests covering happy path, config recording, error paths
- Add test/list.test.ts: 3 tests covering component listing and error paths
- Add test/context.test.ts: 7 tests covering all output formats, splice-on-rerun, error paths
- Add test/playbook.test.ts: 7 tests with mocked fetch for --list, install, and error paths
- Add .github/workflows/cli-tests.yml: runs on push/PR to v2/cli/**
- Use process.chdir() for test isolation; rely on Vitest's process.exit interception

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@roblevintennis roblevintennis merged commit e6c6c61 into master Mar 6, 2026
1 check passed
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