Repository: puppeteer/puppeteer
File: tools/mocha-runner/src/mocha-runner.ts (TypeScript)

Code before:
    const testSuiteId = process.argv[testSuiteArgIdx + 1];
    const testSuite = parsedSuitesFile.testSuites.find(suite => {
      return suite.id === testSuiteId;
    });

    if (!testSuite) {
      console.error(`Test suite ${testSuiteId} is not defined`);
      process.exit(1);
    }

    if (!testSuite.platforms.includes(platform)) {
      console.warn(
        `Test suite ${testSuiteId} is not enabled for your platform. Running it anyway.`
      );
    }

    applicableSuites = [testSuite];
  }

  return applicableSuites;
}

async function main() {
  const noCoverage = process.argv.indexOf('--no-coverage') !== -1;
  const noSuggestions = process.argv.indexOf('--no-suggestions') !== -1;
  const excludeCDPOnly = process.argv.indexOf('--no-cdp-only') !== -1;

  const statsFilenameIdx = process.argv.indexOf('--save-stats-to');
  let statsFilename = '';
  if (statsFilenameIdx !== -1) {
    statsFilename = process.argv[statsFilenameIdx + 1] as string;
    if (statsFilename.includes('INSERTID')) {
      statsFilename = statsFilename.replace(/INSERTID/gi, randomUUID());
    }
  }

  const minTestsIdx = process.argv.indexOf('--min-tests');
  let minTests = 0;
  if (minTestsIdx !== -1) {
    minTests = Number(process.argv[minTestsIdx + 1]);
  }

  const shardIdx = process.argv.indexOf('--shard');
  let shard = null;
  if (shardIdx !== -1) {
    shard = String(process.argv[shardIdx + 1]);
  }

  const platform = zPlatform.parse(os.platform());

  const expectations = readJSON(

Review comment (suggestion):
```suggestion
  const excludeCDPOnly = process.argv.indexOf('--no-cdp-tests') !== -1;
```

Code after:
    const testSuiteId = process.argv[testSuiteArgIdx + 1];
    const testSuite = parsedSuitesFile.testSuites.find(suite => {
      return suite.id === testSuiteId;
    });

    if (!testSuite) {
      console.error(`Test suite ${testSuiteId} is not defined`);
      process.exit(1);
    }

    if (!testSuite.platforms.includes(platform)) {
      console.warn(
        `Test suite ${testSuiteId} is not enabled for your platform. Running it anyway.`
      );
    }

    applicableSuites = [testSuite];
  }

  return applicableSuites;
}

async function main() {
  const noCoverage = process.argv.indexOf('--no-coverage') !== -1;
  const noSuggestions = process.argv.indexOf('--no-suggestions') !== -1;
  const excludeCDPOnly = process.argv.indexOf('--no-cdp-tests') !== -1;

  const statsFilenameIdx = process.argv.indexOf('--save-stats-to');
  let statsFilename = '';
  if (statsFilenameIdx !== -1) {
    statsFilename = process.argv[statsFilenameIdx + 1] as string;
    if (statsFilename.includes('INSERTID')) {
      statsFilename = statsFilename.replace(/INSERTID/gi, randomUUID());
    }
  }

  const minTestsIdx = process.argv.indexOf('--min-tests');
  let minTests = 0;
  if (minTestsIdx !== -1) {
    minTests = Number(process.argv[minTestsIdx + 1]);
  }

  const shardIdx = process.argv.indexOf('--shard');
  let shard = null;
  if (shardIdx !== -1) {
    shard = String(process.argv[shardIdx + 1]);
  }

  const platform = zPlatform.parse(os.platform());

  const expectations = readJSON(