chore: fix lint issue in test file
This commit is contained in:
parent
ed80131a9b
commit
2252543e32
1 changed files with 5 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import { db } from "~/server/db/db";
|
||||||
import { repositoriesTable } from "~/server/db/schema";
|
import { repositoriesTable } from "~/server/db/schema";
|
||||||
import { generateShortId } from "~/server/utils/id";
|
import { generateShortId } from "~/server/utils/id";
|
||||||
import { createTestSession, getAuthHeaders } from "~/test/helpers/auth";
|
import { createTestSession, getAuthHeaders } from "~/test/helpers/auth";
|
||||||
|
import type { RepositoryConfig } from "~/schemas/restic";
|
||||||
|
|
||||||
const app = createApp();
|
const app = createApp();
|
||||||
|
|
||||||
|
|
@ -168,10 +169,13 @@ describe("repositories updates", () => {
|
||||||
const updated = await db.query.repositoriesTable.findFirst({
|
const updated = await db.query.repositoriesTable.findFirst({
|
||||||
where: { id: repository.id },
|
where: { id: repository.id },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const config = updated?.config as Extract<RepositoryConfig, { backend: "local" }>;
|
||||||
|
|
||||||
expect(updated).toBeTruthy();
|
expect(updated).toBeTruthy();
|
||||||
expect(updated?.name).toBe("Updated repository");
|
expect(updated?.name).toBe("Updated repository");
|
||||||
expect(updated?.compressionMode).toBe("max");
|
expect(updated?.compressionMode).toBe("max");
|
||||||
expect((updated?.config as { path?: string }).path).toBe(nextPath);
|
expect(config.path).toBe(nextPath);
|
||||||
expect(updated?.status).toBe("unknown");
|
expect(updated?.status).toBe("unknown");
|
||||||
expect(updated?.lastChecked).toBeNull();
|
expect(updated?.lastChecked).toBeNull();
|
||||||
expect(updated?.lastError).toBeNull();
|
expect(updated?.lastError).toBeNull();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue