diff --git a/test-coverage.md b/test-coverage.md index 16c7749..7776979 100644 --- a/test-coverage.md +++ b/test-coverage.md @@ -40,7 +40,7 @@ If there are any uncovered lines in your current test suite, they will be highli ## Minimum Threshold Enforcement -To ensure comprehensive testing and maintain code quality, it is crucial to set minimum threshold values for coverage results. In Pest, you can use the `--coverage` and `--min` options to define the minimum threshold values for coverage results. If the specified thresholds are not met, Pest will report a failure. +To ensure comprehensive testing and maintain code quality, it is crucial to set minimum threshold values for coverage results. In Pest, you can use the `--coverage` and `--min` or `--exactly` options to define the minimum threshold values for coverage results. If the specified thresholds are not met, Pest will report a failure. ```bash ./vendor/bin/pest --coverage --min=90 @@ -50,6 +50,12 @@ To ensure comprehensive testing and maintain code quality, it is crucial to set +Or, you can use the `--exactly` option to enforce that the coverage results match the specified value exactly. + +```bash +./vendor/bin/pest --coverage --exactly=99.3 +``` + ## Ignoring Code If there are certain sections of your application that cannot be tested and should be excluded from code coverage analysis, you can use `@codeCoverageIgnoreStart` and `@codeCoverageIgnoreEnd` comments in your source code to achieve this.