pestphp/pest · error · InvalidArgumentException
The number of tries must be greater than 0.
Error message
The number of tries must be greater than 0.
What it means
Error "The number of tries must be greater than 0." thrown in pestphp/pest.
Source
Thrown at src/PendingCalls/TestCall.php:346
{
return $this->skipOnWindows()->skipOnMac();
}
public function repeat(int $times): self
{
if ($times < 1) {
throw new InvalidArgumentException('The number of repetitions must be greater than 0.');
}
$this->testCaseMethod->repetitions = $times;
return $this;
}
public function flaky(int $tries = 3): self
{
if ($tries < 1) {
throw new InvalidArgumentException('The number of tries must be greater than 0.');
}
$this->testCaseMethod->flakyTries = $tries;
return $this;
}
public function todo(// @phpstan-ignore-line
array|string|null $note = null,
array|string|null $assignee = null,
array|string|int|null $issue = null,
array|string|int|null $pr = null,
): self {
$this->skip('__TODO__');
$this->testCaseMethod->todo = true;
if ($issue !== null) {View on GitHub (pinned to 1af74a215c)
When it happens
Trigger: Thrown at src/PendingCalls/TestCall.php:346 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pestphp/pest@1af74a215c (2026-08-21).
Data as JSON: /api/errors/65a19c8772b3522c.
Report an issue: GitHub.