Please help !
When i try to run test from truffle, i got this problem, here my test js code:
var DappToken = artifacts.require("./DappToken.sol")
contract(DappToken, function(accounts) {
it ('sets the total supply upon deployment', function() {
return DappToken.deployed().then(function(instance) {
tokenInstance = instance;
return tokenInstance.totalSupply();}).then(function(totalSupply){
assert.equal(totalSupply.toNumber(), 1000000, "sets the total supply to 1000000");
});
});
})
and here my contract code:
pragma solidity ^0.5.0;
contract DappToken {
uint256 public totalSupply;
function DToken () public {
totalSupply = 1000000;
}
}
and here the result of the test:
PS: for more information, I follow the instruction video "Code Your Own Cryptocurrency on Ethereum (Full)" from Dapp University chanel on youtube , at 40:03