fix(core): handle partial listing data
This commit is contained in:
@@ -8,7 +8,7 @@ describe("MCP protocol cookie inputs", () => {
|
||||
beforeEach(() => {
|
||||
global.fetch = mock(() =>
|
||||
Promise.resolve(new Response(JSON.stringify([]), { status: 200 })),
|
||||
) as typeof fetch;
|
||||
) as unknown as typeof fetch;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -48,7 +48,7 @@ describe("MCP protocol cookie inputs", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
const calledUrl = (global.fetch as ReturnType<typeof mock>).mock
|
||||
const calledUrl = (global.fetch as unknown as ReturnType<typeof mock>).mock
|
||||
.calls[0]?.[0];
|
||||
expect(String(calledUrl)).toContain("/facebook?q=laptop");
|
||||
expect(String(calledUrl)).not.toContain("cookies=");
|
||||
@@ -59,7 +59,7 @@ describe("MCP protocol unstableFilter", () => {
|
||||
beforeEach(() => {
|
||||
global.fetch = mock(() =>
|
||||
Promise.resolve(new Response(JSON.stringify([]), { status: 200 })),
|
||||
) as typeof fetch;
|
||||
) as unknown as typeof fetch;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -103,7 +103,7 @@ describe("MCP protocol unstableFilter", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
const calledUrl = (global.fetch as ReturnType<typeof mock>).mock
|
||||
const calledUrl = (global.fetch as unknown as ReturnType<typeof mock>).mock
|
||||
.calls[0]?.[0];
|
||||
expect(String(calledUrl)).toContain("unstableFilter=true");
|
||||
});
|
||||
@@ -127,7 +127,7 @@ describe("MCP protocol unstableFilter", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
const calledUrl = (global.fetch as ReturnType<typeof mock>).mock
|
||||
const calledUrl = (global.fetch as unknown as ReturnType<typeof mock>).mock
|
||||
.calls[0]?.[0];
|
||||
expect(String(calledUrl)).toContain("unstableFilter=true");
|
||||
});
|
||||
@@ -151,7 +151,7 @@ describe("MCP protocol unstableFilter", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
const calledUrl = (global.fetch as ReturnType<typeof mock>).mock
|
||||
const calledUrl = (global.fetch as unknown as ReturnType<typeof mock>).mock
|
||||
.calls[0]?.[0];
|
||||
expect(String(calledUrl)).toContain("unstableFilter=true");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user