mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: guard browser dispatcher assertions
This commit is contained in:
@@ -147,7 +147,9 @@ describe("pw-session getPageForTargetId", () => {
|
||||
expect(fetchInit?.headers).toEqual({});
|
||||
expect(fetchInit?.redirect).toBe("manual");
|
||||
expect(fetchInit?.signal).toBeInstanceOf(AbortSignal);
|
||||
expect(fetchInit?.dispatcher).toBeDefined();
|
||||
if (fetchInit?.dispatcher === undefined) {
|
||||
throw new Error("expected extension fallback fetch dispatcher");
|
||||
}
|
||||
} finally {
|
||||
fetchSpy.mockRestore();
|
||||
}
|
||||
|
||||
@@ -309,6 +309,8 @@ describe("browser remote profile fallback and attachOnly behavior", () => {
|
||||
expect(fetchInit.headers).toEqual({});
|
||||
expect(fetchInit.redirect).toBe("manual");
|
||||
expect(fetchInit.signal).toBeInstanceOf(AbortSignal);
|
||||
expect(fetchInit.dispatcher).toBeDefined();
|
||||
if (fetchInit.dispatcher === undefined) {
|
||||
throw new Error("expected remote browser fetch dispatcher");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user