Skip to content

Instantly share code, notes, and snippets.

@sogoiii
Last active August 10, 2017 23:10
Show Gist options
  • Save sogoiii/db669ad19e1c3ab2b6470e5a3e1e3ac7 to your computer and use it in GitHub Desktop.
Save sogoiii/db669ad19e1c3ab2b6470e5a3e1e3ac7 to your computer and use it in GitHub Desktop.
Truffle test snippet 2
it("should fail because function does not exist on contract", async function () {
let meta = await MetaCoin.deployed();
try {
await meta.someNonExistentFn.call();
} catch (e) {
return true;
}
throw new Error("I should never see this!")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment