mirror of
https://github.com/pestphp/pest.git
synced 2026-12-03 22:45:06 +01:00
Support --profile when running tests in parallel (#1795)
* feat: support profiling parallel tests * test: preserve success snapshot totals * test: preserve visual suite snapshot * fix: stabilize checks on pull requests * fix: align TIA fixture branch resolution * chore: keep parallel profile changes scoped * fix: align TIA fixture branch resolution * Revert unrelated TIA branch fallback change --------- Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
@@ -19,12 +19,18 @@ $run = function (): ?string {
|
||||
test('parallel', function () use ($run): void {
|
||||
$output = $run('--exclude-group=integration');
|
||||
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
|
||||
$profileOutput = $run('tests/Fixtures/Suites/SuccessOnly.php', '--profile');
|
||||
|
||||
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 29 skipped, 1636 passed (3623 assertions)';
|
||||
|
||||
expect($output)
|
||||
->toContain("Tests: {$expected}")
|
||||
->toContain('Parallel: 3 processes');
|
||||
->and(
|
||||
str_contains($output, 'Parallel: 3 processes')
|
||||
&& str_contains((string) $profileOutput, 'Top 10 slowest tests:')
|
||||
&& str_contains((string) $profileOutput, 'can pass with comparison')
|
||||
&& str_contains((string) $profileOutput, 'can also pass'),
|
||||
)->toBeTrue();
|
||||
})->skipOnWindows();
|
||||
|
||||
test('a parallel test can extend another test with same name', function () use ($run): void {
|
||||
|
||||
Reference in New Issue
Block a user