Skip to content

test(init): add 56 tests for initCommand (#577)#637

Merged
agents-squads[bot] merged 1 commit intodevelopfrom
test/init-coverage-577
Mar 27, 2026
Merged

test(init): add 56 tests for initCommand (#577)#637
agents-squads[bot] merged 1 commit intodevelopfrom
test/init-coverage-577

Conversation

@agents-squads
Copy link
Copy Markdown
Contributor

@agents-squads agents-squads bot commented Mar 27, 2026

Summary

  • Replaces placeholder tests (that only tested Node.js filesystem ops) with 56 real tests calling initCommand with mocked dependencies
  • Covers: directory structure, squad files, memory state idempotency, root-level files, Claude/non-Claude provider setup, pack support with dedup, IDP catalog + stack detection (Node/Go/Python/Rust/Ruby), template variables, auto-commit, telemetry, prerequisite checks, and error handling
  • Init command goes from 0% real coverage to comprehensive coverage

Test plan

  • All 56 new tests pass
  • Full test suite passes (1779 tests, 87 files)
  • Build passes

Closes #577

Replace placeholder tests (that only tested Node.js filesystem ops) with
real tests that call initCommand with mocked dependencies:

- Core directory structure (squads, memory, skills, config)
- Squad file creation from templates
- Memory state files (writeIfNew idempotency)
- Root-level files (AGENTS.md, BUSINESS_BRIEF.md, README.md)
- Claude provider setup (.claude dir, CLAUDE.md, settings.json)
- Non-Claude provider skips Claude-specific files
- Pack support (engineering, marketing, operations, all, dedup)
- IDP catalog creation + stack detection (Node/Go/Python/Rust/Ruby)
- Template variable passing (business name, provider, date)
- Auto-commit behavior
- Telemetry tracking (event, agent/squad counts)
- Prerequisite check flow (--force bypass, exit on failure)
- Error handling (EACCES, ENOENT)

Closes #577

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@agents-squads agents-squads bot requested a review from kokevidaurre as a code owner March 27, 2026 16:03
@github-actions github-actions bot added the tests label Mar 27, 2026
@agents-squads agents-squads bot merged commit 568b211 into develop Mar 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants