Events not emitted during tests

I’m implementing OpenZeppelin’s PullPayment (4.0.0) contract.
Unfortunately, during testing I’m always getting AssertionError: Expected event "Deposited" to be emitted, but it wasn't Also the Withdrawn event doesn’t get emitted. But _asyncTransfer seems to run properly as Transfergets emitted.

I checked my ABI and it seems the contract is compiled correctly.

:computer: Environment
I’m using Hardhart with Waffle, Chai, Mocha, Ethers.js.

:1234: Code to reproduce
This is my contract
This is my test

1 Like

Hi @philipp,

Welcome to the community :wave:

I am sorry that you are having this issue. Can you share a simple contract and test?

Perhaps similar to the following: