Skip to content

Commit

Permalink
chore(ProofcastAdapter): add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmp01 committed Jun 17, 2024
1 parent 96dd261 commit 7244cd9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/evm/test/adapters/Proofcast/01_ProofcastAdapter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ describe("Proofcast adapter", () => {
)
})

it("should reject when upon invalid yaho address", async () => {
const fakeYaho = (await ethers.getSigners())[10]
await expect(adapter.initYaho(Chains.Goerli, fakeYaho.address))
.to.emit(adapter, "YahoInitialized")
.withArgs(Chains.Goerli, fakeYaho.address)

await expect(adapter.verifyEventAndStoreHash(statement, signature)).to.revertedWithCustomError(
adapter,
"InvalidYahoAddress",
)
})

it("should set the yaho address successfully", async () => {
await expect(adapter.initYaho(Chains.Goerli, yaho.address))
.to.emit(adapter, "YahoInitialized")
Expand Down

0 comments on commit 7244cd9

Please sign in to comment.