aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/protocol/test/exchange
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-18 10:26:03 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:29 +0800
commit285fb3deadd0413bf993557575a3f96a840f0e10 (patch)
tree8970de6db324e3773146f61265e0b44d03976a60 /contracts/protocol/test/exchange
parent797d7c7878e33ce012259a6a5db5335e9dc838ba (diff)
downloaddexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.gz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.bz2
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.lz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.xz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.zst
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.zip
Progress
Diffstat (limited to 'contracts/protocol/test/exchange')
-rw-r--r--contracts/protocol/test/exchange/core.ts24
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);
});
});
});