From b2b9fe837db7308285909ec1b374546194405d00 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 13 Feb 2026 15:33:37 -0800 Subject: bolt12 autowithdraw --- test/preload.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/preload.ts') diff --git a/test/preload.ts b/test/preload.ts index 9541dacd..a3d3cbb9 100644 --- a/test/preload.ts +++ b/test/preload.ts @@ -3,6 +3,11 @@ import { mock } from "bun:test"; // This file is loaded before test files via bunfig.toml [test].preload // Mocks must be set up here to intercept transitive imports +if (process.env.INTEGRATION) { + // Skip all mocking — use real services + globalThis.__testStore = { kvStore: {}, listStore: {}, setStore: {} }; +} else { + let kvStore: Record = {}; let listStore: Record = {}; let setStore: Record> = {}; @@ -183,6 +188,7 @@ mock.module("$lib/ln", () => ({ listfunds: mock(async () => ({ channels: [] })), keysend: mock(async () => ({})), fetchinvoice: mock(async () => ({})), + getroutes: mock(async () => ({ routes: [] })), sendinvoice: mock(async () => ({})), }, })); @@ -303,3 +309,5 @@ mock.module("$lib/utils", () => { time: () => ({ start: () => {}, end: () => {} }), }; }); + +} // end INTEGRATION skip -- cgit v1.2.3