From 1a277d7e1a09761b15284b7817669bc3429d52a5 Mon Sep 17 00:00:00 2001 From: Lasse R Date: Tue, 26 Dec 2023 16:49:28 +0100 Subject: [PATCH 1/4] Document type coverage reporting --- type-coverage.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/type-coverage.md b/type-coverage.md index e6c0b5a..e72e90d 100644 --- a/type-coverage.md +++ b/type-coverage.md @@ -48,6 +48,12 @@ Just like code coverage, type coverage can also be enforced. To ensure any code ./vendor/bin/pest --type-coverage --min=100 ``` +## Different Formats + +Pest support reporting type coverage to a file as well: + +- `--coverage-clover=`: Save the type coverage report in JSON format to a specified file. + --- In the chapter, we have discussed Pest's Type Coverage plugin and how it can be used to measure the percentage of code that is covered by type declarations. In the following chapter, we explain how can you use Snapshots to test your code: [Snapshot Testing](/docs/snapshot-testing) From e6cee0719720209ad3fc3d09bd64a0cfe31445c4 Mon Sep 17 00:00:00 2001 From: Lasse R Date: Tue, 26 Dec 2023 16:50:27 +0100 Subject: [PATCH 2/4] Change command name --- type-coverage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type-coverage.md b/type-coverage.md index e72e90d..d1a2b38 100644 --- a/type-coverage.md +++ b/type-coverage.md @@ -52,7 +52,7 @@ Just like code coverage, type coverage can also be enforced. To ensure any code Pest support reporting type coverage to a file as well: -- `--coverage-clover=`: Save the type coverage report in JSON format to a specified file. +- `--type-coverage-json=`: Save the type coverage report in JSON format to a specified file. --- From 0a4e2d3685973cc0764d7d1247b07b0410a792d7 Mon Sep 17 00:00:00 2001 From: Lasse R Date: Tue, 26 Dec 2023 16:52:52 +0100 Subject: [PATCH 3/4] Update type-coverage.md --- type-coverage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type-coverage.md b/type-coverage.md index d1a2b38..f77a4f3 100644 --- a/type-coverage.md +++ b/type-coverage.md @@ -50,7 +50,7 @@ Just like code coverage, type coverage can also be enforced. To ensure any code ## Different Formats -Pest support reporting type coverage to a file as well: +Pest support reporting type coverage to a file: - `--type-coverage-json=`: Save the type coverage report in JSON format to a specified file. From e3d007b0a5678212f50d898dbfdcb66de3b30fd7 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 26 Dec 2023 16:12:46 +0000 Subject: [PATCH 4/4] Update type-coverage.md --- type-coverage.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/type-coverage.md b/type-coverage.md index f77a4f3..2cdb427 100644 --- a/type-coverage.md +++ b/type-coverage.md @@ -50,9 +50,11 @@ Just like code coverage, type coverage can also be enforced. To ensure any code ## Different Formats -Pest support reporting type coverage to a file: +In additionm, Pest support reporting the type coverage to a specific file: -- `--type-coverage-json=`: Save the type coverage report in JSON format to a specified file. +```bash +./vendor/bin/pest --type-coverage --min=100 --type-coverage-json=my-report.json +``` ---