contract('FooMarket', function ([owner, alice]) { beforeEach(async function () { this.HodeToken = await HogeToken.new(); this.FooMarket = await FooMarket.new(this.HodeToken.address, { from: owner }); await this.FooMarket.setWhitelisted(owner, true, { from: owner }); await this.FooMarket.setWhitelisted(alice, true, { from: owner }); }); describe('transfer hoge token', function () { it('token balance should be changed', async function () { await this.HogeToken.mint(alice, 100, { from: owner }); assert(await this.FooMarket.transfer(alice, bob, 100, { from: owner })); const aliceBalance = await this.HogeToken.balanceOf(alice); const bobBalance = await this.HogeToken.balanceOf(bob); assert.equal(aliceBalance, 0); assert.equal(bobBalance, 100); }); }); : });