Skip to content

Instantly share code, notes, and snippets.

@sogoiii
Created June 30, 2017 18:56
Show Gist options
  • Save sogoiii/773b294e4dbb2dd39071c4e865c96076 to your computer and use it in GitHub Desktop.
Save sogoiii/773b294e4dbb2dd39071c4e865c96076 to your computer and use it in GitHub Desktop.
Default truffle test snippet
var MetaCoin = artifacts.require("./MetaCoin.sol");
// ... more code
contract('MetaCoin', function(accounts) {
it("should put 10000 MetaCoin in the first account", async function() {
let meta = await MetaCoin.deployed();
let balance = await meta.getBalance.call(accounts[0]);
assert.equal(balance.valueOf(), 10000, "10000 wasn't in the first account")
});
// ... more code
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment