EnableCoverage returns a TestRunnerOption which enables coverage calculation for the test run.
()
| 543 | |
| 544 | // EnableCoverage returns a TestRunnerOption which enables coverage calculation for the test run. |
| 545 | func EnableCoverage() TestRunnerOption { |
| 546 | return func(tr *TestRunner) (*TestRunner, error) { |
| 547 | tr.EnableCoverage = true |
| 548 | tr.testProgramOptions = append(tr.testProgramOptions, cel.EvalOptions(cel.OptTrackState)) |
| 549 | return tr, nil |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | // Program represents the result of creating CEL programs for the configured expressions in the |
| 554 | // test runner. It encompasses the following: |