Skip to content

Commit

Permalink
feat: test that getThresholdHash() reverts if threshold reports 0
Browse files Browse the repository at this point in the history
  • Loading branch information
auryn-macmillan committed Jul 5, 2023
1 parent 7e43884 commit 75756de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/evm/test/02_ShoyuBashi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ describe("ShoyuBashi", function () {
"ThresholdNotMet",
)
})
it.only("Reverts if threshold returns bytes(0)", async function () {
const { shoyuBashi, mockOracleAdapter, anotherOracleAdapter } = await setup()
await shoyuBashi.enableOracleAdapters(DOMAIN_ID, [mockOracleAdapter.address, anotherOracleAdapter.address])
await expect(shoyuBashi.getThresholdHash(DOMAIN_ID, 0)).to.be.revertedWithCustomError(
shoyuBashi,
"ThresholdNotMet",
)
})
it("Returns unanimous agreed on hash", async function () {
const { shoyuBashi, mockOracleAdapter, anotherOracleAdapter } = await setup()
await shoyuBashi.enableOracleAdapters(DOMAIN_ID, [mockOracleAdapter.address, anotherOracleAdapter.address])
Expand Down

0 comments on commit 75756de

Please sign in to comment.