Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
poly-rodr committed Sep 24, 2024
1 parent 503e7ed commit 169a51f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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", () => {
Expand Down

0 comments on commit 169a51f

Please sign in to comment.