Open schaable opened 1 year ago
I always known there was something strange in my tests :) perhaps multiple emits looks like can be chained, correct?
Yes, .emit
is the only one that can be chained (and only to itself).
@schaable we should update the plugin's readme to add emit
to the list of matchers that do not support chaining, and add a clarification saying "The only exception is chaining multiple .emit matchers" or something like that.
Describe the feature
The hardhat-chai-matchers plugin currently lacks support for chaining with async matchers such as
reverted
,revertedWith
,changeEtherBalance
, etc.Chaining would enable users to create more expressive and readable assertions by combining multiple matchers, improving the testing experience.
Example of the desired chaining:
As a temporary workaround, you can create separate assertions for each async matcher:
If you believe implementing chaining for async matchers would be valuable and beneficial for your testing workflows, please consider upvoting this issue to show your interest and support.
Search terms
No response