Contract: TokenFarm
Mock Dai deployment
1) has a name
> No events were emitted
0 passing (662ms)
1 failing
1) Contract: TokenFarm
Mock Dai deployment
has a name:
AssertionError: expected 'Mock DAI Token' to equal 'Mock Dai Token'
+ expected - actual
-Mock DAI Token
+Mock Dai Token
----------------
//TokenFarm.test.js
const { assert } = require('chai')
const DappToken = artifacts.require('DappToken')
const DaiToken = artifacts.require('DaiToken')
const TokenFarm = artifacts.require('TokenFarm')
require('chai')
.use(require('chai-as-promised'))
.should()
contract('TokenFarm', (accounts) => {
let daiToken
before(async () => {
daiToken = await DaiToken.new()
})
describe('Mock Dai deployment', async () => {
it('has a name', async () => {
const name = await daiToken.name()
assert.equal(name, 'Mock DAI Token')
})
})
})
reference:
https://www.youtube.com/watch?v=XLahq4qyors
No comments:
Post a Comment