Files
pest/tests/Unit/Plugins/Retry.php
T
Ikki Nishihara f80b3a89a0 Reject the parallel short flag during retry (#2043)
Co-authored-by: haranishi <223786623+haranishi@users.noreply.github.com>
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
2026-11-20 15:12:02 +05:30

23 lines
623 B
PHP

<?php
use Pest\Exceptions\InvalidOption;
use Pest\Plugins\Retry;
it('orders by defects and stop on defects if when --retry is used ', function (): void {
$retry = new Retry;
$arguments = $retry->handleArguments(['--retry']);
expect($arguments)->toBe([
'--order-by=defects',
'--stop-on-failure',
]);
});
it('rejects retry with a parallel flag', function (string $parallelFlag): void {
(new Retry)->handleArguments(['--retry', $parallelFlag]);
})->with(['--parallel', '-p'])->throws(
InvalidOption::class,
'The [--retry] option is not supported when running in parallel.',
);