chore: fix linting issues
This commit is contained in:
parent
d8bf4c2ef3
commit
0f098a8f71
2 changed files with 15 additions and 12 deletions
|
|
@ -7,7 +7,7 @@ import {
|
||||||
createTestSessionWithRegularMember,
|
createTestSessionWithRegularMember,
|
||||||
getAuthHeaders,
|
getAuthHeaders,
|
||||||
} from "~/test/helpers/auth";
|
} from "~/test/helpers/auth";
|
||||||
import { account, invitation, member, organization, ssoProvider, usersTable } from "~/server/db/schema";
|
import { account } from "~/server/db/schema";
|
||||||
import { db } from "~/server/db/db";
|
import { db } from "~/server/db/db";
|
||||||
|
|
||||||
const app = createApp();
|
const app = createApp();
|
||||||
|
|
|
||||||
|
|
@ -252,18 +252,21 @@ describe("repositoriesService.dumpSnapshot", () => {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const dumpMock = vi.fn(
|
const dumpMock = vi.fn((_config: unknown, snapshotRef: string, options: Parameters<typeof restic.dump>[2]) => {
|
||||||
(_config: unknown, snapshotRef: string, options: { organizationId: string; path: string; archive?: false }) =>
|
if (!options.path) {
|
||||||
Promise.resolve(
|
throw new Error("Expected dump path in test");
|
||||||
createDumpResult(
|
}
|
||||||
JSON.stringify({
|
|
||||||
snapshotRef,
|
return Promise.resolve(
|
||||||
path: options.path,
|
createDumpResult(
|
||||||
archive: options.archive !== false,
|
JSON.stringify({
|
||||||
}),
|
snapshotRef,
|
||||||
),
|
path: options.path,
|
||||||
|
archive: options.archive !== false,
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
});
|
||||||
vi.spyOn(restic, "dump").mockImplementation(dumpMock);
|
vi.spyOn(restic, "dump").mockImplementation(dumpMock);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue