chore: Fix types in tests 29/N.

This commit is contained in:
cpojer
2026-02-17 14:32:43 +09:00
parent 03e6acd051
commit ecf1c955a1
12 changed files with 67 additions and 35 deletions

View File

@@ -27,6 +27,8 @@ function makeState(
cdpIsLoopback: profile !== "remote",
remoteCdpTimeoutMs: 1500,
remoteCdpHandshakeTimeoutMs: 3000,
evaluateEnabled: false,
extraArgs: [],
color: "#FF4500",
headless: true,
noSandbox: false,
@@ -62,7 +64,7 @@ describe("browser server-context remote profile tab operations", () => {
listPagesViaPlaywright,
createPageViaPlaywright,
closePageByTargetIdViaPlaywright,
} as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
} as unknown as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
const fetchMock = vi.fn(async () => {
throw new Error("unexpected fetch");
@@ -127,7 +129,7 @@ describe("browser server-context remote profile tab operations", () => {
closePageByTargetIdViaPlaywright: vi.fn(async () => {
throw new Error("unexpected close");
}),
} as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
} as unknown as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
const fetchMock = vi.fn(async () => {
throw new Error("unexpected fetch");
@@ -154,7 +156,7 @@ describe("browser server-context remote profile tab operations", () => {
vi.spyOn(pwAiModule, "getPwAiModule").mockResolvedValue({
listPagesViaPlaywright,
focusPageByTargetIdViaPlaywright,
} as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
} as unknown as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
const fetchMock = vi.fn(async () => {
throw new Error("unexpected fetch");
@@ -180,7 +182,7 @@ describe("browser server-context remote profile tab operations", () => {
listPagesViaPlaywright: vi.fn(async () => {
throw new Error("boom");
}),
} as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
} as unknown as Awaited<ReturnType<typeof pwAiModule.getPwAiModule>>);
const fetchMock = vi.fn(async () => {
throw new Error("unexpected fetch");