aboutsummaryrefslogtreecommitdiffstats
path: root/test/preload.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-13 15:33:37 -0800
committerAdam Soltys <[email protected]>2026-02-13 15:33:37 -0800
commitb2b9fe837db7308285909ec1b374546194405d00 (patch)
treebe9dbc10c7f0699b40ac2ed2534869e6b9e772e7 /test/preload.ts
parent542cf1d084d189bcdf127c9c2359cced5267295e (diff)
downloadcoinos-server-b2b9fe837db7308285909ec1b374546194405d00.tar.gz
coinos-server-b2b9fe837db7308285909ec1b374546194405d00.zip
bolt12 autowithdraw
Diffstat (limited to 'test/preload.ts')
-rw-r--r--test/preload.ts8
1 files changed, 8 insertions, 0 deletions
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<string, string> = {};
let listStore: Record<string, string[]> = {};
let setStore: Record<string, Set<string>> = {};
@@ -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