diff --git a/tests/support/fixtures.ts b/tests/support/fixtures.ts index 263a809f4..3e78c1ada 100644 --- a/tests/support/fixtures.ts +++ b/tests/support/fixtures.ts @@ -9,7 +9,7 @@ import { test as base, expect, type ViewportSize } from "@playwright/test"; import * as Process from "./process.js"; import * as issue from "@tests/support/cobs/issue.js"; -import * as logLabel from "@tests/support/logLabel.js"; +import * as logLabel from "@tests/support/logPrefix.js"; import * as patch from "@tests/support/cobs/patch.js"; import { createOptions, supportDir, tmpDir } from "@tests/support/support.js"; import { createPeerManager } from "@tests/support/peerManager.js"; @@ -52,7 +52,7 @@ export const test = base.extend<{ forAllTests: [ async ({ customAppConfig, outputLog, page }, use) => { - const browserLabel = logLabel.make("browser"); + const browserLabel = logLabel.logPrefix("browser"); page.on("console", msg => { // Ignore common console logs that we don't care about. if ( @@ -111,7 +111,7 @@ export const test = base.extend<{ }); } - const playwrightLabel = logLabel.make("playwright"); + const playwrightLabel = logLabel.logPrefix("playwright"); function isLocalhost(url: URL) { return url.hostname === "localhost" || url.hostname === "127.0.0.1"; diff --git a/tests/support/logLabel.ts b/tests/support/logPrefix.ts similarity index 94% rename from tests/support/logLabel.ts rename to tests/support/logPrefix.ts index d4f0a2672..8de5b7a96 100644 --- a/tests/support/logLabel.ts +++ b/tests/support/logPrefix.ts @@ -23,7 +23,7 @@ const availableColors: ColorName[] = [ const assignedColors: Record = {}; -export function make(label: string): string { +export function logPrefix(label: string): string { if (assignedColors[label] === undefined) { const color = availableColors.pop(); if (!color) { diff --git a/tests/support/process.ts b/tests/support/process.ts index 304839803..34d541549 100644 --- a/tests/support/process.ts +++ b/tests/support/process.ts @@ -5,7 +5,7 @@ import onExit from "exit-hook"; import { StringDecoder } from "string_decoder"; import { execa } from "execa"; -import { make } from "./logLabel.js"; +import { logPrefix } from "./logPrefix.js"; // Processes that should be SIGKILLed when the Node process shutsdown. // We add all proxy and node instances that we spawn to this list. @@ -42,7 +42,7 @@ export function prefixOutput( label: string, output: Stream.Writable, ): ExecaChildProcess { - const pref = make(label); + const pref = logPrefix(label); if (childProcess.stdout) { const stdoutPrefix = new LinePrefix(pref); childProcess.stdout.pipe(stdoutPrefix).pipe(output, { end: false });