feat: expand API coverage with new tools, params, and 90% test threshold

This commit is contained in:
Deivid Soto 2026-02-12 15:45:08 +01:00
parent 8bb8e5507e
commit fa913d1561
21 changed files with 1573 additions and 88 deletions

View file

@ -47,12 +47,12 @@ describe("get_popular tool", () => {
expect(result.content[0].text).toContain("200 clicks");
});
it("defaults limit to 10", async () => {
it("defaults limit to 12", async () => {
const getPopularMock = vi.fn().mockResolvedValue({
items: [],
total: 0,
page: 1,
pageSize: 10,
pageSize: 12,
});
const client = createMockClient({ getPopular: getPopularMock });
const { server, getToolHandler } = createMockServer();
@ -61,7 +61,7 @@ describe("get_popular tool", () => {
const handler = getToolHandler("get_popular");
await handler({});
expect(getPopularMock).toHaveBeenCalledWith(10, undefined);
expect(getPopularMock).toHaveBeenCalledWith(12, undefined, undefined);
});
it("returns isError on ApiError", async () => {