diff options
| author | Adam Soltys <[email protected]> | 2026-03-15 21:53:52 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-15 21:53:52 -0700 |
| commit | ddfe2e3279706f6476364cecfe23427dcabcfd3e (patch) | |
| tree | f37a2ea3d8e904214c7d8b695c3d87dca7c56466 /test/integration | |
| parent | fddfe10f84908c058e239b93985dfe02ba37df04 (diff) | |
| download | coinos-server-ddfe2e3279706f6476364cecfe23427dcabcfd3e.tar.gz coinos-server-ddfe2e3279706f6476364cecfe23427dcabcfd3e.zip | |
tests
Diffstat (limited to 'test/integration')
| -rw-r--r-- | test/integration/ark-reconcile.test.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/integration/ark-reconcile.test.ts b/test/integration/ark-reconcile.test.ts index 342d02a6..c223149d 100644 --- a/test/integration/ark-reconcile.test.ts +++ b/test/integration/ark-reconcile.test.ts @@ -83,6 +83,7 @@ beforeAll(async () => { describe("ark sync reconciliation", () => { test("syncs new transactions and creates payment records", async () => { const hash = `test-recv-${Date.now()}`; + const oldTime = Date.now() - 200_000; const result = await api("/ark/sync", token, { method: "POST", body: JSON.stringify({ @@ -93,7 +94,7 @@ describe("ark sync reconciliation", () => { commitmentTxid: null, amount: 10000, settled: true, - createdAt: Date.now(), + createdAt: oldTime, }, ], balance: 10000, @@ -115,7 +116,7 @@ describe("ark sync reconciliation", () => { method: "POST", body: JSON.stringify({ aid: arkAccountId, - transactions: [{ arkTxid: hash, amount: 3000, settled: true, createdAt: Date.now() }], + transactions: [{ arkTxid: hash, amount: 3000, settled: true, createdAt: Date.now() - 200_000 }], balance: 13000, }), }); @@ -125,7 +126,7 @@ describe("ark sync reconciliation", () => { method: "POST", body: JSON.stringify({ aid: arkAccountId, - transactions: [{ arkTxid: hash, amount: 3000, settled: true, createdAt: Date.now() }], + transactions: [{ arkTxid: hash, amount: 3000, settled: true, createdAt: Date.now() - 200_000 }], balance: 13000, }), }); @@ -177,7 +178,7 @@ describe("ark sync reconciliation", () => { method: "POST", body: JSON.stringify({ aid: arkAccountId, - transactions: [{ arkTxid: hash, amount: 5000, settled: true, createdAt: Date.now() }], + transactions: [{ arkTxid: hash, amount: 5000, settled: true, createdAt: Date.now() - 200_000 }], balance: 5000, }), }); |
