Skip to content

Instantly share code, notes, and snippets.

@marekkirejczyk
Created January 18, 2019 15:57
Show Gist options
  • Save marekkirejczyk/b5fc939b7b5ca667ca26832c5bda53b4 to your computer and use it in GitHub Desktop.
Save marekkirejczyk/b5fc939b7b5ca667ca26832c5bda53b4 to your computer and use it in GitHub Desktop.
Waffle: Use fixture
it('Assigns initial balance', async () => {
const {token, wallet} = await loadFixture(fixture);
expect(await token.balanceOf(wallet.address)).to.eq(1000);
});
it('Transfer adds amount to destination account', async () => {
const {token, other} = await loadFixture(fixture);
await token.transfer(other.address, 7);
expect(await token.balanceOf(other.address)).to.eq(7);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment