diff options
| author | Adam Soltys <[email protected]> | 2026-02-13 15:33:37 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-13 15:33:37 -0800 |
| commit | b2b9fe837db7308285909ec1b374546194405d00 (patch) | |
| tree | be9dbc10c7f0699b40ac2ed2534869e6b9e772e7 /test/preload.ts | |
| parent | 542cf1d084d189bcdf127c9c2359cced5267295e (diff) | |
| download | coinos-server-b2b9fe837db7308285909ec1b374546194405d00.tar.gz coinos-server-b2b9fe837db7308285909ec1b374546194405d00.zip | |
bolt12 autowithdraw
Diffstat (limited to 'test/preload.ts')
| -rw-r--r-- | test/preload.ts | 8 |
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 |
