Last active
August 6, 2021 11:30
-
-
Save percybolmer/4be9ec2b962fdd74f361b389018970c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DevToken = artifacts.require("DevToken"); | |
// Start a test series named DevToken, it will use 10 test accounts | |
contract("DevToken", async accounts => { | |
// each it is a new test, and we name our first test initial supply | |
it("initial supply", async () => { | |
// wait until devtoken is deplyoed, store the results inside devToken | |
// the result is a client to the Smart contract api | |
devToken = await DevToken.deployed(); | |
// call our totalSUpply function | |
let supply = await devToken.totalSupply() | |
// Assert that the supply matches what we set in migration | |
assert.equal(supply.toNumber(), 5000000, "Initial supply was not the same as in migration") | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment