From 0f098a8f712e09e9c8b04b2f30d468474fcd4c3b Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 1 Apr 2026 20:02:02 +0200 Subject: [PATCH] chore: fix linting issues --- .../auth.controller.security.test.ts | 2 +- .../__tests__/repositories.service.test.ts | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/server/modules/auth/__tests__/auth.controller.security.test.ts b/app/server/modules/auth/__tests__/auth.controller.security.test.ts index d5345e18..e730767a 100644 --- a/app/server/modules/auth/__tests__/auth.controller.security.test.ts +++ b/app/server/modules/auth/__tests__/auth.controller.security.test.ts @@ -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(); diff --git a/app/server/modules/repositories/__tests__/repositories.service.test.ts b/app/server/modules/repositories/__tests__/repositories.service.test.ts index bc4ac038..6a81028f 100644 --- a/app/server/modules/repositories/__tests__/repositories.service.test.ts +++ b/app/server/modules/repositories/__tests__/repositories.service.test.ts @@ -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[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 {