From 3e90a7287a5cb32883f5c9103fb17df1bc685b40 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 3 Dec 2026 21:14:51 +0100 Subject: [PATCH] Fix duplicate import in app-caller.ts and mock Pool typing in store.test.ts --- src/app-caller.ts | 4 ---- tests/store.test.ts | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/app-caller.ts b/src/app-caller.ts index d25a881..635d273 100644 --- a/src/app-caller.ts +++ b/src/app-caller.ts @@ -16,10 +16,6 @@ import { timingSafeEqual } from "node:crypto"; import { type AppSlug } from "./contracts.js"; import { type HeimdallConfig } from "./config.js"; -import { timingSafeEqual } from "node:crypto"; -import { type AppSlug } from "./contracts.js"; -import { type HeimdallConfig } from "./config.js"; - declare const appCallerBrand: unique symbol; export interface AppCaller { diff --git a/tests/store.test.ts b/tests/store.test.ts index 5a8e7e1..cba35c3 100644 --- a/tests/store.test.ts +++ b/tests/store.test.ts @@ -464,11 +464,11 @@ describe("PostgresStore.checkSchema", () => { const store = new PostgresStore({ query: async (sql: string, params?: unknown[]) => { queries.push({ sql, params }); - return { rows: [], rowCount: 0 } as never; + return { rows: [], rowCount: 0 }; }, end: async () => {}, - connect: async () => ({}) as never, - }); + connect: async () => ({}), + } as unknown as Pool); await expect(store.checkSchema()).resolves.toBeUndefined(); expect(queries).toHaveLength(2); @@ -480,12 +480,12 @@ describe("PostgresStore.checkSchema", () => { it("throws SCHEMA_MISSING when any core table is missing", async () => { const store = new PostgresStore({ query: async (sql: string) => { - if (sql === "SELECT 1") return { rows: [], rowCount: 0 } as never; - return { rows: [{ name: "consent_receipts" }], rowCount: 1 } as never; + if (sql === "SELECT 1") return { rows: [], rowCount: 0 }; + return { rows: [{ name: "consent_receipts" }], rowCount: 1 }; }, end: async () => {}, - connect: async () => ({}) as never, - }); + connect: async () => ({}), + } as unknown as Pool); await expect(store.checkSchema()).rejects.toMatchObject({ code: "SCHEMA_MISSING" }); });