aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-15 21:53:52 -0700
committerAdam Soltys <[email protected]>2026-03-15 21:53:52 -0700
commitddfe2e3279706f6476364cecfe23427dcabcfd3e (patch)
treef37a2ea3d8e904214c7d8b695c3d87dca7c56466 /test/integration
parentfddfe10f84908c058e239b93985dfe02ba37df04 (diff)
downloadcoinos-server-ddfe2e3279706f6476364cecfe23427dcabcfd3e.tar.gz
coinos-server-ddfe2e3279706f6476364cecfe23427dcabcfd3e.zip
tests
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/ark-reconcile.test.ts9
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,
}),
});