INNER CODE UNIT · JavaScript

testMatch

rancher/terraform-provider-rancher2 · agent-scripts/after-invoke.js:163

  const testMatch = /unit test|test suite|go test|run_tests/i.test(report);
  if (!testMatch) {
    errors.push(
      'Testing report must explicitly confirm execution of the active unit tests or comprehensive test suites.',
    );
  }

  // 3. Status Check
  const statusMatch = /status:\s*🟢\s*SUCCESS|success|pass/i.test(report);
  if (!statusMatch) {
    errors.push('Testing report must contain an explicit success status declaration.');
  }

  return {
    valid: errors.length === 0,
    errors,
  };
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…