github NomicFoundation/hardhat @nomicfoundation/hardhat-chai-matchers@2.0.2

This release forbids our async matchers from being chained. This means that you can't do something like:

await expect(contract.f())
  .to.changeEtherBalance(...)
  .and.to.changeTokenBalance(...)

This never worked properly, leading to potential false positives in tests. Now this pattern will throw an error to make it clear that it's not supported.

If some of your tests start throwing because of this, the way to do the same thing without chaining is:

const tx = contract.f();

await expect(tx).to.changeEtherBalance(...);
await expect(tx).to.changeTokenBalance(...);

Don't miss a new hardhat release

NewReleases is sending notifications on new releases.