style: add prettier and format codebase

This commit is contained in:
Deivid Soto 2026-02-12 15:22:11 +01:00
parent bf459740fe
commit 2f58ac7bf8
18 changed files with 151 additions and 70 deletions

View file

@ -55,7 +55,9 @@ describe("get_credits tool", () => {
it("returns isError on ApiError", async () => {
const client = createMockClient({
getCredits: vi.fn().mockRejectedValue(new ApiError(503, "TMDB unavailable")),
getCredits: vi
.fn()
.mockRejectedValue(new ApiError(503, "TMDB unavailable")),
});
const { server, getToolHandler } = createMockServer();
registerGetCredits(server, client);

View file

@ -14,8 +14,7 @@ function createMockClient(overrides: Partial<TorrentClawClient> = {}) {
getTorrentDownloadUrl: vi
.fn()
.mockImplementation(
(hash: string) =>
`https://torrentclaw.com/api/v1/torrent/${hash}`,
(hash: string) => `https://torrentclaw.com/api/v1/torrent/${hash}`,
),
...overrides,
} as unknown as TorrentClawClient;

View file

@ -24,7 +24,13 @@ describe("get_watch_providers tool", () => {
country: "ES",
providers: {
flatrate: [
{ providerId: 8, name: "Netflix", logo: null, link: null, displayPriority: 1 },
{
providerId: 8,
name: "Netflix",
logo: null,
link: null,
displayPriority: 1,
},
],
rent: [],
buy: [],
@ -64,7 +70,9 @@ describe("get_watch_providers tool", () => {
it("returns isError on ApiError", async () => {
const client = createMockClient({
getWatchProviders: vi.fn().mockRejectedValue(new ApiError(404, "Not found")),
getWatchProviders: vi
.fn()
.mockRejectedValue(new ApiError(404, "Not found")),
});
const { server, getToolHandler } = createMockServer();
registerGetWatchProviders(server, client);
@ -78,7 +86,9 @@ describe("get_watch_providers tool", () => {
it("returns isError on generic error", async () => {
const client = createMockClient({
getWatchProviders: vi.fn().mockRejectedValue(new Error("Connection refused")),
getWatchProviders: vi
.fn()
.mockRejectedValue(new Error("Connection refused")),
});
const { server, getToolHandler } = createMockServer();
registerGetWatchProviders(server, client);