Skip to content

Commit

Permalink
test: Update error tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Cory authored and Will Cory committed Jun 17, 2023
1 parent 554e227 commit 89b7ee7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sdk/test/cross-chain-messenger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,22 +565,22 @@ describe('CrossChainMessenger', () => {
})

describe('when the transaction sent more than one message', () => {
it('should throw an error', async () => {
it('should not throw an error', async () => {
const messages = [...Array(2)].map(() => {
return DUMMY_MESSAGE
})

const tx = await l1Messenger.triggerSentMessageEvents(messages)
await expect(messenger.toCrossChainMessage(tx)).to.be.rejectedWith(
await expect(messenger.toCrossChainMessage(tx)).not.to.be.rejectedWith(
'expected 1 message, got 2'
)
})
})

describe('when the transaction sent no messages', () => {
it('should throw an error', async () => {
it('should not throw an error', async () => {
const tx = await l1Messenger.triggerSentMessageEvents([])
await expect(messenger.toCrossChainMessage(tx)).to.be.rejectedWith(
await expect(messenger.toCrossChainMessage(tx)).not.to.be.rejectedWith(
'expected 1 message, got 0'
)
})
Expand Down

0 comments on commit 89b7ee7

Please sign in to comment.