Polyman Documentation - v2.2.2
    Preparing search index...

    Function testWhatAction

    • Tests validator, checker, or solution programs. For validator/checker: Runs self-tests from their test configuration. For solutions: Tests against main-correct solution using checker.

      Parameters

      • what: string

        'validator', 'checker', or solution name to test

      Returns Promise<void>

      Resolves when testing completes

      If Config.json is invalid

      If validator/checker tests fail

      If solution doesn't exist

      If main-correct solution doesn't exist

      If solution behavior doesn't match expected type

      // From CLI: polyman test validator
      await testWhatAction('validator');
      // Runs validator self-tests from validator_tests.json
      // From CLI: polyman test checker
      await testWhatAction('checker');
      // Runs checker self-tests from checker_tests.json
      // From CLI: polyman test wa-solution
      await testWhatAction('wa-solution');
      // Runs wa-solution and main solution, compares with checker
      // Validates that wa-solution gets WA on at least one test