Test for multiple emits of the same event with expectEvent

chicobermuda asked on Telegram:

Is it possible to use expectEvent to test for multiple emits of the same event, each with unspecified args, without digging into the event object manually?

1 Like

Thanks Andrew. I have tried it, but each expectEvent call seems to pass once the first event is found.

This is not currently supported.

OpenZeppelin Test Helpers will detect the first named event emitted in expectEvent and not check for multiple events.

I created an issue for this: https://github.com/OpenZeppelin/openzeppelin-test-helpers/issues/135

1 Like