From 428f196036f3f11c0b7be184235da623851780b1 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 21 Feb 2025 05:22:59 -0800 Subject: [PATCH] test: have typed RunResult.results (#34883) --- tests/playwright-test/fixtures.spec.ts | 2 +- tests/playwright-test/playwright-test-fixtures.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright-test/fixtures.spec.ts b/tests/playwright-test/fixtures.spec.ts index a130f8dfcb..f822557d4a 100644 --- a/tests/playwright-test/fixtures.spec.ts +++ b/tests/playwright-test/fixtures.spec.ts @@ -596,7 +596,7 @@ test('should understand worker fixture params in overrides calling base', async ]}; `, }); - const outputs = result.results.map(r => r.stdout[0].text.replace(/\s/g, '')); + const outputs = result.results.map(r => r.stdout.filter(output => 'text' in output)[0].text.replace(/\s/g, '')); expect(outputs.sort()).toEqual(['foo-p1-override-bar', 'foo-p2-override-bar', 'foo-p3-override-bar']); }); diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.ts index 43503497d2..c06019a3b2 100644 --- a/tests/playwright-test/playwright-test-fixtures.ts +++ b/tests/playwright-test/playwright-test-fixtures.ts @@ -48,7 +48,7 @@ export type RunResult = { interrupted: number, didNotRun: number, report: JSONReport, - results: any[], + results: JSONReportTestResult[], }; type TSCResult = {