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

Commit

Permalink
Updating tests after fixing log decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
hysz committed Jan 14, 2020
1 parent b3c3ec1 commit 7a7f70e
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions contracts/exchange/test/wrapper_unit_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,25 @@ blockchainTests('Exchange wrapper functions unit tests.', env => {
}
}

function assertSameOrderFromEvent(actual: any[], expected: Order): void {
expect(actual.length === 14);
expect(actual[0].toLowerCase()).to.be.eq(expected.makerAddress);
expect(actual[1].toLowerCase()).to.be.eq(expected.takerAddress);
expect(actual[2].toLowerCase()).to.be.eq(expected.feeRecipientAddress);
expect(actual[3].toLowerCase()).to.be.eq(expected.senderAddress);
expect(actual[4]).to.be.bignumber.eq(expected.makerAssetAmount);
expect(actual[5]).to.be.bignumber.eq(expected.takerAssetAmount);
expect(actual[6]).to.be.bignumber.eq(expected.makerFee);
expect(actual[7]).to.be.bignumber.eq(expected.takerFee);
expect(actual[8]).to.be.bignumber.eq(expected.expirationTimeSeconds);
expect(actual[9]).to.be.bignumber.eq(expected.salt);
expect(actual[10]).to.be.eq(expected.makerAssetData);
expect(actual[11]).to.be.eq(expected.takerAssetData);
expect(actual[12]).to.be.eq(expected.makerFeeAssetData);
expect(actual[13]).to.be.eq(expected.takerFeeAssetData);
function assertSameOrderFromEvent(actual: any, expected: Order): void {
expect(actual.makerAddress).to.be.eq(expected.makerAddress);
expect(actual.takerAddress).to.be.eq(expected.takerAddress);
expect(actual.feeRecipientAddress).to.be.eq(expected.feeRecipientAddress);
expect(actual.senderAddress).to.be.eq(expected.senderAddress);
expect(actual.makerAssetAmount).to.bignumber.eq(expected.makerAssetAmount);
expect(actual.takerAssetAmount).to.bignumber.eq(expected.takerAssetAmount);
expect(actual.makerFee).to.bignumber.eq(expected.makerFee);
expect(actual.takerFee).to.bignumber.eq(expected.takerFee);
expect(actual.expirationTimeSeconds).to.bignumber.eq(expected.expirationTimeSeconds);
expect(actual.salt).to.bignumber.eq(expected.salt);
expect(actual.makerAssetData).to.eq(expected.makerAssetData);
expect(actual.takerAssetData).to.eq(expected.takerAssetData);
expect(actual.makerFeeAssetData).to.eq(expected.makerFeeAssetData);
expect(actual.takerFeeAssetData).to.eq(expected.takerFeeAssetData);
}

describe.only('fillOrKillOrder', () => {
it.only('works if the order is filled by exactly `takerAssetFillAmount`', async () => {
describe('fillOrKillOrder', () => {
it('works if the order is filled by exactly `takerAssetFillAmount`', async () => {
const fillAmount = randomAmount();
const order = randomOrder({
// `_fillOrder()` is overridden to always return `order.takerAssetAmount` as
Expand Down

0 comments on commit 7a7f70e

Please sign in to comment.