From ddfe2e3279706f6476364cecfe23427dcabcfd3e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 15 Mar 2026 21:53:52 -0700 Subject: tests --- test/integration/ark-reconcile.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/integration') 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, }), }); -- cgit v1.2.3