fix: lint errors and warnings
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
15 files changed
+51
-48
No files matched your search
@@ -36,7 +36,7 @@ const setupMockFetch = (responses: Record<string, MockResponseData>) => {
|
||||
new Response(body, {
|
||||
status: 200,
|
||||
headers: { "content-type": "application/json" },
|
||||
}) as unknown as Awaited<ReturnType<typeof fetchWithTrustedCertificatesAsync>>,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ const setupMockFetch = (responses: Record<string, MockResponseData>) => {
|
||||
new Response(JSON.stringify({ error: "Not Found" }), {
|
||||
status: 404,
|
||||
headers: { "content-type": "application/json" },
|
||||
}) as unknown as Awaited<ReturnType<typeof fetchWithTrustedCertificatesAsync>>,
|
||||
}),
|
||||
);
|
||||
});
|
||||
};
|
||||
@@ -82,7 +82,7 @@ describe("CoolifyIntegration", () => {
|
||||
new Response("Unauthorized", {
|
||||
status: 401,
|
||||
headers: { "content-type": "text/plain" },
|
||||
}) as unknown as Awaited<ReturnType<typeof fetchWithTrustedCertificatesAsync>>,
|
||||
}),
|
||||
);
|
||||
|
||||
const integration = createCoolifyIntegration();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { join } from "path";
|
||||
import { GenericContainer, getContainerRuntimeClient, ImageName, Wait } from "testcontainers";
|
||||
import type { StartedTestContainer } from "testcontainers";
|
||||
import { GenericContainer, getContainerRuntimeClient, ImageName, Wait } from "testcontainers";
|
||||
import { beforeAll, describe, expect, test, vi } from "vitest";
|
||||
|
||||
import { createDb } from "@homarr/db/test";
|
||||
|
||||
import { SabnzbdIntegration } from "../src";
|
||||
import { TestConnectionError } from "../src/base/test-connection/test-connection-error";
|
||||
import type { DownloadClientItem } from "../src/interfaces/downloads/download-client-items";
|
||||
|
||||
vi.mock("@homarr/db", async (importActual) => {
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||
@@ -189,8 +188,7 @@ describe("Sabnzbd integration", () => {
|
||||
const item = await sabNzbdAddItemAsync(startedContainer, DEFAULT_API_KEY, sabnzbdIntegration);
|
||||
|
||||
// Act - fromDisk already doesn't work for sabnzbd, so only test deletion itself.
|
||||
const actAsync = async () =>
|
||||
await sabnzbdIntegration.deleteItemAsync({ ...item, progress: 0 } as DownloadClientItem, false);
|
||||
const actAsync = async () => await sabnzbdIntegration.deleteItemAsync({ ...item, progress: 0 }, false);
|
||||
const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync({ limit: 99 });
|
||||
|
||||
// Assert
|
||||
|
||||
Reference in new issue
Block a user