seed('master'); $project->write('tests/Unit/GreeterTest.php', <<<'PHP' toBe(0); } expect((new Greeter)->greet('Nuno'))->toBe('Hello, Nuno!'); }); test('greets the world', function (): void { expect((new Greeter)->greet('world'))->toBe('Hello, world!'); }); PHP); $project->git()->commit('a greeter test that commits while the run is in flight'); $project->write('commit-during-run', ''); $during = $project->pest('--tia', ...$arguments); expect($during->exitCode)->toBe(0, $during->describe()) ->and($project->path('commit-during-run'))->not->toBeFile() ->and($during->output)->toContain('HEAD moved during the run'); $after = $project->pest('--tia', ...$arguments); expect($after->exitCode)->toBe(1, $after->describe()) ->and($after->tally())->toContain('failed') ->and($after->replayed())->toBeLessThan(Project::TOTAL_TESTS, $after->describe()); })->with(Project::SEQUENTIAL_AND_PARALLEL)->skipOnWindows();