From d3970a22d1df8ff2c96e0cb101d88738f3d63d70 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 20 Jun 2025 13:04:41 +0200 Subject: [PATCH] chore: smaller codex fixes (#36374) --- packages/playwright/src/matchers/toMatchSnapshot.ts | 2 +- packages/playwright/src/runner/testServer.ts | 2 +- packages/playwright/src/util.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/playwright/src/matchers/toMatchSnapshot.ts b/packages/playwright/src/matchers/toMatchSnapshot.ts index 98fc72a6f2..b2ef3c3323 100644 --- a/packages/playwright/src/matchers/toMatchSnapshot.ts +++ b/packages/playwright/src/matchers/toMatchSnapshot.ts @@ -135,7 +135,7 @@ class SnapshotHelper { this.locator = locator; this.updateSnapshots = testInfo.config.updateSnapshots; - this.mimeType = mime.getType(path.basename(this.expectedPath)) ?? 'application/octet-string'; + this.mimeType = mime.getType(path.basename(this.expectedPath)) ?? 'application/octet-stream'; this.comparator = getComparator(this.mimeType); this.testInfo = testInfo; diff --git a/packages/playwright/src/runner/testServer.ts b/packages/playwright/src/runner/testServer.ts index 61be3b2929..4a182fbdc7 100644 --- a/packages/playwright/src/runner/testServer.ts +++ b/packages/playwright/src/runner/testServer.ts @@ -142,7 +142,7 @@ export class TestServerDispatcher implements TestServerInterface { process.stdout.columns = params.cols; process.stdout.rows = params.rows; process.stderr.columns = params.cols; - process.stderr.columns = params.rows; + process.stderr.rows = params.rows; } async checkBrowsers(): Promise<{ hasBrowsers: boolean; }> { diff --git a/packages/playwright/src/util.ts b/packages/playwright/src/util.ts index 00a839cb19..a7d120770f 100644 --- a/packages/playwright/src/util.ts +++ b/packages/playwright/src/util.ts @@ -147,7 +147,7 @@ export function createTitleMatcher(patterns: RegExp | RegExp[]): Matcher { }; } -export function mergeObjects(a: A | undefined | void, b: B | undefined | void, c: B | undefined | void): A & B & C { +export function mergeObjects(a: A | undefined | void, b: B | undefined | void, c: C | undefined | void): A & B & C { const result = { ...a } as any; for (const x of [b, c].filter(Boolean)) { for (const [name, value] of Object.entries(x as any)) {