Skip to content

test: add missing test coverage for init, changelog, and tag commands#258

Merged
indaco merged 2 commits intomainfrom
test/init-changelog-tag
Apr 4, 2026
Merged

test: add missing test coverage for init, changelog, and tag commands#258
indaco merged 2 commits intomainfrom
test/init-changelog-tag

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Apr 4, 2026

Description

Adds test coverage for gaps identified during a code-vs-docs review of all CLI commands.

init command (workspace_test.go, initcmd_test.go):

  • Asserts root .version is NOT created by --workspace init
  • Tests --workspace --migrate interaction (migrate silently ignored)
  • Asserts workspace.versioning == "independent" in generated config
  • Asserts {module_path}/v prefix in workspace tag-manager config
  • Adds "full" template to the template test matrix

changelog command (changelogcmd_test.go):

  • Tests multi-module merge with subdirectory-scoped files (.changes/moduleA/v1.0.0.md) and verifies module-prefixed headings

tag command (tagcmd_test.go):

  • Tests tag create --all multi-module flow with duplicate tag skipping
  • Tests semver sorting with multiple module-scoped prefixes

Related Issue

  • None

Notes for Reviewers

  • No production code changes, test-only

indaco added 2 commits April 4, 2026 10:49
…fig assertions

- Assert root .version is NOT created by workspace init
- Assert workspace.versioning == "independent" in generated config
- Assert {module_path}/v prefix in workspace tag-manager config
- Add "full" template to TestCLI_InitCommand_WithTemplateFlag matrix
- verify recursive collection from module subdirectories with module-prefixed headings
- verify per-module tag creation and duplicate tag skipping in multi-module mode
- table-driven test for semver sorting with mixed module-scoped prefixes
@indaco indaco merged commit 9cfc9a2 into main Apr 4, 2026
7 checks passed
@indaco indaco deleted the test/init-changelog-tag branch April 4, 2026 10:32
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