Skip to content

Commit

Permalink
Add invariant unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Dec 4, 2024
1 parent ea0cb15 commit 51dd6c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Dataworker.blockRangeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ describe("Dataworker block range-related utility methods", async function () {
throw new Error(`Chain ${originChainId} SpokePoolClient has not been updated`);
}

// Does not error if earliest block range object is empty:
expect(
(
await blockRangesAreInvalidForSpokeClients(
_spokePoolClients,
[[0, spokePoolClients[chainId].latestBlockSearched]],
chainIds,
{}
)
).result
).to.not.throw;

// latestInvalidBundleStartBlock is only used if its greater than the spoke pool deployment block, so in the
// following tests, set latestInvalidBundleStartBlock > deployment blocks.

Expand Down

0 comments on commit 51dd6c3

Please sign in to comment.