refacto: --retry option

This commit is contained in:
Nuno Maduro
2023-02-11 16:48:06 +00:00
parent a8f0b96338
commit d69f61c8d3
18 changed files with 61 additions and 200 deletions

View File

@ -2,14 +2,13 @@
use Pest\Plugins\Retry;
beforeEach(fn () => Retry::$retrying = false);
afterEach(fn () => Retry::$retrying = false);
it('retries if --retry argument is used', function () {
it('orders by defects and stop on defects if when --retry is used ', function () {
$retry = new Retry();
$retry->handleArguments(['--retry']);
$arguments = $retry->handleArguments(['--retry']);
expect(Retry::$retrying)->toBeTrue();
expect($arguments)->toBe([
'--order-by=defects',
' --stop-on-defect',
]);
});