Skip to main content

CODITECT Command Validation Test Suite

Comprehensive tests to verify all 141 commands have correct configuration, valid frontmatter, proper invocation patterns, and consistent documentation.

Run: python3 scripts/tests/test_commands.py python3 scripts/tests/test_commands.py -v # Verbose python3 scripts/tests/test_commands.py --command git-sync # Single command

Author: CODITECT Team Version: 1.0.0 Created: 2025-12-22

File: test_commands.py

Classes

Colors

No description

TestResult

No description

CommandValidation

No description

CommandTestSuite

Comprehensive test suite for CODITECT commands

Functions

get_framework_root()

Get framework root directory

main()

No description

get_all_commands()

Get all command markdown files

parse_frontmatter(content)

Parse YAML frontmatter from markdown content

test_has_frontmatter(content, command_name)

Test that command has YAML frontmatter

test_required_frontmatter(frontmatter, command_name)

Test that all required frontmatter fields are present

Test that recommended frontmatter fields are present (warning only)

test_component_type(frontmatter, command_name)

Test that component_type is valid

test_status(frontmatter, command_name)

Test that status is valid

test_invocation_pattern(frontmatter, command_name)

Test that invocation pattern is present and valid

test_has_usage_section(body, command_name)

Test that command has a Usage section

test_has_examples(body, command_name)

Test that command has examples

test_no_placeholders(content, command_name)

Test that command has no placeholder text outside code blocks

test_version_format(frontmatter, command_name)

Test that version follows semver format

validate_command(command_path)

Run all validation tests on a command

Usage

python test_commands.py