Make test cases that use assertJump fail if they dont fail

This commit is contained in:
Jorge Izquierdo
2017-01-23 19:18:41 +01:00
parent ad833fb40d
commit 2f0471fff2
4 changed files with 16 additions and 8 deletions

View File

@ -26,8 +26,9 @@ contract('LimitBalance', function(accounts) {
try {
let limDeposit = await lb.limitedDeposit({value: amount});
} catch(error) {
assertJump(error);
return assertJump(error);
}
assert.fail('should have thrown before');
});
it("should allow multiple sends below limit", async function() {
@ -49,8 +50,9 @@ contract('LimitBalance', function(accounts) {
try {
await lb.limitedDeposit({value: amount+1})
} catch(error) {
assertJump(error);
return assertJump(error);
}
assert.fail('should have thrown before');
});
});