From 169a51f7b81073510b5c513c8f79c31d301031d0 Mon Sep 17 00:00:00 2001 From: Rodrigo <95635797+poly-rodr@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:49:44 -0300 Subject: [PATCH] tests --- tests/utilities.test.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/utilities.test.ts b/tests/utilities.test.ts index 8efa045..cf76f5f 100644 --- a/tests/utilities.test.ts +++ b/tests/utilities.test.ts @@ -5551,12 +5551,13 @@ describe("utilities", () => { { price: "0.7", size: "100" }, ], hash: "", + timestamp: "123456789", } as OrderBookSummary; expect(generateOrderBookSummaryHash(orderbook)).to.equal( - "b8b72c72c6534d1b3a4e7fb47b81672d0e94d5a5", + "a2e42a1dc528c65bb927faef7539ffef1b9484de", ); - expect(orderbook.hash).to.equal("b8b72c72c6534d1b3a4e7fb47b81672d0e94d5a5"); + expect(orderbook.hash).to.equal("a2e42a1dc528c65bb927faef7539ffef1b9484de"); // - orderbook = { @@ -5570,13 +5571,14 @@ describe("utilities", () => { { price: "0.6", size: "100" }, { price: "0.7", size: "100" }, ], - hash: "b8b72c72c6534d1b3a4e7fb47b81672d0e94d5a5", + hash: "a2e42a1dc528c65bb927faef7539ffef1b9484de", + timestamp: "123456789", } as OrderBookSummary; expect(generateOrderBookSummaryHash(orderbook)).to.equal( - "b8b72c72c6534d1b3a4e7fb47b81672d0e94d5a5", + "a2e42a1dc528c65bb927faef7539ffef1b9484de", ); - expect(orderbook.hash).to.equal("b8b72c72c6534d1b3a4e7fb47b81672d0e94d5a5"); + expect(orderbook.hash).to.equal("a2e42a1dc528c65bb927faef7539ffef1b9484de"); // - orderbook = { @@ -5585,12 +5587,13 @@ describe("utilities", () => { bids: [], asks: [], hash: "", + timestamp: "", } as OrderBookSummary; expect(generateOrderBookSummaryHash(orderbook)).to.equal( - "7f81a35a09e1933a96b05edb51ac4be4a6163146", + "9da2ac9109ceed8d754f9a5f7a06998d8d3aa0af", ); - expect(orderbook.hash).to.equal("7f81a35a09e1933a96b05edb51ac4be4a6163146"); + expect(orderbook.hash).to.equal("9da2ac9109ceed8d754f9a5f7a06998d8d3aa0af"); }); it("isTickSizeSmaller", () => {