Skip to content

Instantly share code, notes, and snippets.

@marekkirejczyk
Created April 23, 2020 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marekkirejczyk/26760be05f2e559ed45e66da1285519c to your computer and use it in GitHub Desktop.
Save marekkirejczyk/26760be05f2e559ed45e66da1285519c to your computer and use it in GitHub Desktop.
Mocking Smart Contracts with Waffle
const mockContract = await deployMockContract(wallet, Contract.interface);
await mockContract.mock.add.returns(1);
await mockContract.mock.mul.withArgs(2, 2).returns(4);
await mockContract.mock.div.withArgs(3, 0).reverts();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment