Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Return eventually rejectedWith
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz committed Mar 21, 2019
1 parent bec440c commit 7556438
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/contract-wrappers/test/exchange_wrapper_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ describe.only('ExchangeWrapper', () => {
'0x1b61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403',
};

expect(
return expect(
contractWrappers.exchange.validateOrderFillableOrThrowAsync(signedOrderWithInvalidSignature),
).to.eventually.to.be.rejectedWith(RevertReason.InvalidOrderSignature);
});
Expand All @@ -310,7 +310,7 @@ describe.only('ExchangeWrapper', () => {
});
});
it('should throw if the amount is greater than the allowance/balance', async () => {
expect(
return expect(
contractWrappers.exchange.validateOrderFillableOrThrowAsync(signedOrder, {
// tslint:disable-next-line:custom-no-magic-numbers
expectedFillTakerTokenAmount: new BigNumber(2).pow(256).minus(1),
Expand Down Expand Up @@ -343,12 +343,9 @@ describe.only('ExchangeWrapper', () => {
signedOrder.makerAssetAmount,
),
);
try {
await contractWrappers.exchange.validateOrderFillableOrThrowAsync(invalidSignedOrder);
expect(true).to.be.false(); // never hit
} catch (e) {
expect(e.message).to.include('TRANSFER_FAILED');
}
return expect(
contractWrappers.exchange.validateOrderFillableOrThrowAsync(invalidSignedOrder),
).to.eventually.to.be.rejectedWith('TRANSFER_FAILED');
});
});
describe('#isValidSignature', () => {
Expand Down

0 comments on commit 7556438

Please sign in to comment.