INNER CODE UNIT · JavaScript

validateTestContent

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

export function validateTestContent(report) {
  const errors = [];

  // 1. Linters check
  const lintMatch = /linter|lint|eslint|golangci-lint|tflint|static check/i.test(report);
  if (!lintMatch) {
    errors.push('Testing report must explicitly confirm successful static analysis and linter execution.');
  }

  // 2. Test execution check
  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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…