chore: Fix types in tests 45/N.

This commit is contained in:
cpojer
2026-02-17 15:49:07 +09:00
parent 52ad28e097
commit 048e29ea35
13 changed files with 67 additions and 27 deletions

View File

@@ -153,7 +153,9 @@ describe("port collision prevention", () => {
const { resolveBrowserConfig } = await import("./config.js");
// Simulate what happens with raw config (empty) vs resolved config
const rawConfig = { browser: {} }; // Fresh config, no profiles
const rawConfig: { browser: { profiles?: Record<string, { cdpPort?: number }> } } = {
browser: {},
}; // Fresh config, no profiles
const buggyUsedPorts = getUsedPorts(rawConfig.browser?.profiles);
const buggyAllocatedPort = allocateCdpPort(buggyUsedPorts);
@@ -161,7 +163,9 @@ describe("port collision prevention", () => {
expect(buggyAllocatedPort).toBe(CDP_PORT_RANGE_START);
// Resolved config: includes implicit openclaw at 18800
const resolved = resolveBrowserConfig(rawConfig.browser);
const resolved = resolveBrowserConfig(
rawConfig.browser as Parameters<typeof resolveBrowserConfig>[0],
);
const fixedUsedPorts = getUsedPorts(resolved.profiles);
const fixedAllocatedPort = allocateCdpPort(fixedUsedPorts);