Skip to content

✨ Add debug flag for raw command output #64

@jordanpartridge

Description

@jordanpartridge

Problem

When tests fail, users cannot see the raw Pest output that would help them debug the issue. The gate only shows processed/formatted output through the table interface.

Current Behavior

  • Pest runs with --colors=never flag
  • Output is processed and formatted into table
  • Raw stderr and debugging context is lost

Expected Behavior

Add a --debug flag to show raw Pest output before formatting.

Proposed Implementation

File: app/Checks/TestRunner.php:46-50

Add debug output option:

$result = $this->processRunner->run(
    ['vendor/bin/pest', '--coverage', "--min={$this->coverageThreshold}", "--coverage-clover={$cloverPath}", '--colors=never'],
    $workingDirectory,
    timeout: 300,
);

// Add this after the run
if ($this->option('debug')) {
    echo "\n=== Raw Pest Output ===\n";
    echo $result->output;
    echo "\n=======================\n";
}

File: app/Commands/CertifyCommand.php:29

Add debug flag to signature:

protected $signature = 'certify
    {--coverage=80 : Minimum coverage threshold percentage}
    {--token= : GitHub token for Checks API}
    {--stop-on-failure : Stop at first failing check}
    {--compact : Show single-line output instead of verbose}
    {--debug : Show raw command output for debugging}';

Benefits

  • Helps users debug complex test failures
  • Provides full context that table formatting removes
  • Non-breaking change (opt-in flag)

Related Issues

This would help debug issue #63 (table truncation) by providing alternative output method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions