Skip to content

Instantly share code, notes, and snippets.

@alexroan
Created March 21, 2020 17:12
Show Gist options
  • Save alexroan/38efc95b301e18a5b3f5d12d7b45f379 to your computer and use it in GitHub Desktop.
Save alexroan/38efc95b301e18a5b3f5d12d7b45f379 to your computer and use it in GitHub Desktop.
truffle-tests/entryPoint.test.js
const EntryPoint = artifacts.require("./EntryPoint.sol");
require('chai')
.use(require('chai-as-promised'))
.should();
contract("EntryPoint", accounts => {
describe("Storing Values", () => {
it("Stores correctly", async () => {
const entryPoint = await EntryPoint.deployed();
let numberOfValues = await entryPoint.getNumberOfValues();
numberOfValues.toString().should.equal("0");
await entryPoint.storeTwoValues(2,4);
numberOfValues = await entryPoint.getNumberOfValues();
numberOfValues.toString().should.equal("2");
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment