Skip to main content
Tests can assert on events that are expected to be published. The following example sets up a test environment, registers an increment contract, and checks the events published by each increment invocation. env.events().all() returns only the events published by the last contract invocation, so the test asserts on the events after every call.
For the full example the above snippet is extracted from, see the events example contract.