Skip to content

Instantly share code, notes, and snippets.

@fzeoli
Created February 8, 2019 15:20
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 fzeoli/34fd7823c310072355affe6507623f49 to your computer and use it in GitHub Desktop.
Save fzeoli/34fd7823c310072355affe6507623f49 to your computer and use it in GitHub Desktop.
const assert = require("assert");
describe("Ethereum provider", function() {
it("Should return the accounts", async function() {
const accounts = await ethereum.send("eth_accounts");
assert(accounts.length !== 0, "No account was returned");
});
});
contract("Greeter", function() {
it("Should give the correct greeting", async function() {
const Greeter = artifacts.require("Greeter");
const greeter = await Greeter.new("Hello, Buidler!");
assert.equal(await greeter.greet(), "Hello, Buidler!");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment