TestCommand constructor

TestCommand()

Implementation

TestCommand() {
  argParser.addOptionMorphemeYaml();
  argParser.addOption(
    'apps',
    abbr: 'a',
    help: 'Target specific app for testing (optional)',
  );
  argParser.addOption(
    'feature',
    abbr: 'f',
    help: 'Target specific feature for testing (optional)',
  );
  argParser.addOption(
    'page',
    abbr: 'p',
    help: 'Target specific page within a feature (optional)',
  );
  argParser.addFlag(
    'coverage',
    abbr: 'c',
    help: 'Enable code coverage analysis and reporting',
    defaultsTo: false,
  );
  argParser.addOption(
    'reporter',
    abbr: 'r',
    help: '''Test result output format:

        [compact]       Single line, updated continuously (default)
        [expanded]      Separate line for each update, ideal for CI
        [failures-only] Only show failing tests
        [github]        GitHub Actions compatible format
        [json]          Machine-readable JSON format
        [silent]        No output, exit code only''',
    allowed: [
      'compact',
      'expanded',
      'failures-only',
      'github',
      'json',
      'silent',
    ],
  );
  argParser.addOption(
    'file-reporter',
    help: '''Save test results to file in specified format.
                                                           Format: <reporter>:<filepath>
                                                           Example: "json:reports/tests.json"''',
  );
}