fix: made code cleaner. added helper. removed done from most tests.
This commit is contained in:
@ -32,7 +32,7 @@ contract('Killable', function(accounts) {
|
||||
}
|
||||
};
|
||||
|
||||
it("should send balance to owner after death", async function(done) {
|
||||
it("should send balance to owner after death", async function() {
|
||||
let initBalance, newBalance, owner, address, killable, kBalance, txnHash, receiptMined;
|
||||
web3.eth.sendTransaction({from: web3.eth.coinbase, to: accounts[0], value: web3.toWei('50','ether')}, function(err, result) {
|
||||
if(err)
|
||||
@ -49,8 +49,8 @@ contract('Killable', function(accounts) {
|
||||
txnHash = await killable.kill({from: owner});
|
||||
receiptMined = await web3.eth.getTransactionReceiptMined(txnHash);
|
||||
newBalance = web3.eth.getBalance(owner);
|
||||
|
||||
assert.isTrue(newBalance > initBalance);
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user