Files
pest/tests/Features/Tia/ScopedRunNotices.php
T
Jhon Farias 59c1cb78f8 feat(tia): replay unaffected tests in a partial run (#2092)
* feat(tia): replay unaffected tests in a partial run

* fix(tia): run a partial selection directly where a complete run is refused

* fix(tia): leave a graph from another environment alone in a partial run
2026-12-04 14:23:50 +05:30

28 lines
901 B
PHP

<?php
declare(strict_types=1);
use Tests\Fixtures\Tia\Project;
afterEach(function (): void {
Project::destroyAll();
});
test('a partial run without a coverage driver names its selection, not the full suite', function (): void {
$project = Project::make('master');
$project->seed('master');
$project->write('app/Calculator.php', str_replace(
'return $a + $b;',
'return $b + $a;',
(string) file_get_contents($project->path().'/app/Calculator.php'),
));
$result = $project->pestWithEnvironment($project->path(), ['XDEBUG_MODE' => 'off'], '--tia', 'tests/Unit');
expect($result->exitCode)->toBe(0, $result->describe())
->and($result->output)->toContain('no coverage driver is available')
->and($result->tally())->toContain('4 passed')
->and($result->output)->not->toContain('Running the full suite');
})->skipOnWindows();