AssertionError when an event is emitted
See original GitHub issueHi!
Firstly, thanks for this incredibly useful library. It makes my whole testing flow that much more manageable.
I’m running into an issue where the an AssertionError: Event filter for <eventName> returned no results is thrown, when, whilst running the tests, the output is
Events emitted during test:
---------------------------
eventName([args])
---------------------------
Is this a bug?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to use truffle-assertions to verify parameters of an emit?
This is the emit I am trying to test: event ... It fails with the error AssertionError: Event filter for Transfer returned no...
Read more >AssertionError: Specified args not emitted - Solidity Hardhat
I have a smart contract that I'm testing the first functions of, and so far everything seems fine apart from one argument of...
Read more >Events not emitted during tests - OpenZeppelin Forum
Unfortunately, during testing I'm always getting AssertionError: Expected event "Deposited" to be emitted, but it wasn't Also the Withdrawn ...
Read more >Node.js v19.3.0 Documentation
If the values are not strictly equal, an AssertionError is thrown with a message property set equal to the value of the message...
Read more >Errors | Node.js v18 API
AssertionError s are a special class of error that can be triggered when Node.js ... onLine (node:repl:902:10) // at REPLServer.emit (node:events:549:35) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ohhh… got it.
If I use
instead of
it passes.
Thanks for this awesome library =)
you can do return ev.i.toNumber() === 1; and it’ll work