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,
|
||||
getAuthHeaders,
|
||||
} 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";
|
||||
|
||||
const app = createApp();
|
||||
|
|
|
|||
|
|
@ -252,18 +252,21 @@ describe("repositoriesService.dumpSnapshot", () => {
|
|||
},
|
||||
]);
|
||||
|
||||
const dumpMock = vi.fn(
|
||||
(_config: unknown, snapshotRef: string, options: { organizationId: string; path: string; archive?: false }) =>
|
||||
Promise.resolve(
|
||||
createDumpResult(
|
||||
JSON.stringify({
|
||||
snapshotRef,
|
||||
path: options.path,
|
||||
archive: options.archive !== false,
|
||||
}),
|
||||
),
|
||||
const dumpMock = vi.fn((_config: unknown, snapshotRef: string, options: Parameters<typeof restic.dump>[2]) => {
|
||||
if (!options.path) {
|
||||
throw new Error("Expected dump path in test");
|
||||
}
|
||||
|
||||
return Promise.resolve(
|
||||
createDumpResult(
|
||||
JSON.stringify({
|
||||
snapshotRef,
|
||||
path: options.path,
|
||||
archive: options.archive !== false,
|
||||
}),
|
||||
),
|
||||
);
|
||||
);
|
||||
});
|
||||
vi.spyOn(restic, "dump").mockImplementation(dumpMock);
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue