diff options
Diffstat (limited to 'contracts/protocol/test/exchange/core.ts')
-rw-r--r-- | contracts/protocol/test/exchange/core.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contracts/protocol/test/exchange/core.ts b/contracts/protocol/test/exchange/core.ts index 700643b79..6688f0fad 100644 --- a/contracts/protocol/test/exchange/core.ts +++ b/contracts/protocol/test/exchange/core.ts @@ -1035,18 +1035,18 @@ describe('Exchange core', () => { }); }); - describe('getOrderInfo', () => { + describe.only('getOrderInfo', () => { beforeEach(async () => { signedOrder = await orderFactory.newSignedOrderAsync(); }); - it('should return the correct orderInfo for an unfilled valid order', async () => { + it.only('should return the correct orderInfo for an unfilled valid order', async () => { const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder); const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder); const expectedTakerAssetFilledAmount = new BigNumber(0); const expectedOrderStatus = OrderStatus.Fillable; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for a fully filled order', async () => { await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress); @@ -1056,7 +1056,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.FullyFilled; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for a partially filled order', async () => { const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2); @@ -1067,7 +1067,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.Fillable; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for a cancelled and unfilled order', async () => { await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress); @@ -1077,7 +1077,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.Cancelled; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for a cancelled and partially filled order', async () => { const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2); @@ -1089,7 +1089,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.Cancelled; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for an expired and unfilled order', async () => { const currentTimestamp = await getLatestBlockTimestampAsync(); @@ -1101,7 +1101,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.Expired; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for an expired and partially filled order', async () => { const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2); @@ -1115,7 +1115,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.Expired; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for an expired and fully filled order', async () => { await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress); @@ -1129,7 +1129,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.FullyFilled; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for an order with a makerAssetAmount of 0', async () => { signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: new BigNumber(0) }); @@ -1139,7 +1139,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.InvalidMakerAssetAmount; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); it('should return the correct orderInfo for an order with a takerAssetAmount of 0', async () => { signedOrder = await orderFactory.newSignedOrderAsync({ takerAssetAmount: new BigNumber(0) }); @@ -1149,7 +1149,7 @@ describe('Exchange core', () => { const expectedOrderStatus = OrderStatus.InvalidTakerAssetAmount; expect(orderInfo.orderHash).to.be.equal(expectedOrderHash); expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount); - expect(orderInfo.orderStatus).to.equal(expectedOrderStatus); + expect(orderInfo.orderStatus).to.be.bignumber.equal(expectedOrderStatus); }); }); }); |