We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As per the waffle docs, we should be able to use the calledOnContract and calledOnContractWith chai matchers:
calledOnContract
calledOnContractWith
await token.balanceOf(wallet.address) expect('balanceOf').to.be.calledOnContract(token);
But they don't work in this project.
Modify the "should count up" test like this:
it("should count up", async () => { await counter.countUp(); let count = await counter.getCount(); expect(count).to.eq(1); expect("getCount").to.be.calledOnContract(counter); });
You will get the following error when running the test:
TypeError: contract.provider must be a MockProvider
The text was updated successfully, but these errors were encountered:
After a bit of investigation, I found out that this is a bug, either in Waffle or in Buidler's integration thereof: NomicFoundation/hardhat#638
Sorry, something went wrong.
Thanks for reporting. I'll watch the linked issues and add this to the examples.
No branches or pull requests
Description
As per the waffle docs, we should be able to use the
calledOnContract
andcalledOnContractWith
chai matchers:But they don't work in this project.
How to Reproduce
Modify the "should count up" test like this:
You will get the following error when running the test:
The text was updated successfully, but these errors were encountered: