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

@ -38,6 +38,7 @@ describe("search_content tool", () => {
genres: ["Action"],
ratingImdb: "8.8",
ratingTmdb: "8.4",
contentUrl: null,
hasTorrents: true,
torrents: [],
},
@ -79,6 +80,12 @@ describe("search_content tool", () => {
min_rating: 7,
quality: "1080p",
language: "es",
audio: "atmos",
hdr: "dolby_vision",
availability: "available",
locale: "es",
season: 1,
episode: 5,
sort: "seeders",
page: 2,
limit: 15,
@ -94,6 +101,12 @@ describe("search_content tool", () => {
min_rating: 7,
quality: "1080p",
language: "es",
audio: "atmos",
hdr: "dolby_vision",
availability: "available",
locale: "es",
season: 1,
episode: 5,
sort: "seeders",
page: 2,
limit: 15,
@ -101,11 +114,11 @@ describe("search_content tool", () => {
});
});
it("defaults limit to 10", async () => {
it("defaults limit to 20", async () => {
const searchMock = vi.fn().mockResolvedValue({
total: 0,
page: 1,
pageSize: 10,
pageSize: 20,
results: [],
});
const client = createMockClient({ search: searchMock });
@ -116,7 +129,7 @@ describe("search_content tool", () => {
await handler({ query: "test" });
expect(searchMock).toHaveBeenCalledWith(
expect.objectContaining({ limit: 10 }),
expect.objectContaining({ limit: 20 }),
);
});