Skip to content

Commit

Permalink
chore: rephrase suggestion for slow test files (#34012)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Dec 16, 2024
1 parent d4b2c96 commit 76bb01d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/playwright/src/reporters/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class BaseReporter implements ReporterV2 {
console.log(colors.yellow(' Slow test file: ') + file + colors.yellow(` (${milliseconds(duration)})`));
});
if (slowTests.length)
console.log(colors.yellow(' Consider splitting slow test files to speed up parallel execution'));
console.log(colors.yellow(' Consider running tests from slow files in parallel, see https://playwright.dev/docs/test-parallel.'));
}

private _printSummary(summary: string) {
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright-test/reporter-base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
expect(result.output).toContain(`Slow test file: [bar] › dir${path.sep}a.test.js (`);
expect(result.output).toContain(`Slow test file: [baz] › dir${path.sep}a.test.js (`);
expect(result.output).toContain(`Slow test file: [qux] › dir${path.sep}a.test.js (`);
expect(result.output).toContain(`Consider splitting slow test files to speed up parallel execution`);
expect(result.output).toContain(`Consider running tests from slow files in parallel`);
expect(result.output).not.toContain(`Slow test file: [foo] › dir${path.sep}b.test.js (`);
expect(result.output).not.toContain(`Slow test file: [bar] › dir${path.sep}b.test.js (`);
expect(result.output).not.toContain(`Slow test file: [baz] › dir${path.sep}b.test.js (`);
Expand Down

0 comments on commit 76bb01d

Please sign in to comment.