-
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
982353f
commit 5d32dd0
Showing
4 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Pest\Plugins\Coverage; | ||
use Symfony\Component\Console\Output\NullOutput; | ||
|
||
test('compute comparable coverage', function (float $givenValue, float $expectedValue) { | ||
$output = new NullOutput(); | ||
|
||
$plugin = new Coverage($output); | ||
|
||
$comparableCoverage = (fn () => $this->computeComparableCoverage($givenValue))->call($plugin); | ||
|
||
expect($comparableCoverage)->toBe($expectedValue); | ||
})->with([ | ||
[0, 0], | ||
[0.5, 0.5], | ||
[1.0, 1.0], | ||
[32.51, 32.5], | ||
[32.12312321312312, 32.1], | ||
[32.53333333333333, 32.5], | ||
[32.57777771232132, 32.5], | ||
[100.0, 100.0], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters