From 4012e31115dd0571d742b42a48094f41fd53a460 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Thu, 21 Jun 2018 19:17:33 -0700 Subject: Use make-promises-safe as a preloader instead of manually importing --- packages/order-utils/test/assert_test.ts | 1 - packages/order-utils/test/exchange_transfer_simulator_test.ts | 1 - packages/order-utils/test/order_hash_test.ts | 1 - packages/order-utils/test/remaining_fillable_calculator_test.ts | 1 - packages/order-utils/test/signature_utils_test.ts | 1 - 5 files changed, 5 deletions(-) (limited to 'packages/order-utils/test') diff --git a/packages/order-utils/test/assert_test.ts b/packages/order-utils/test/assert_test.ts index 4b22ef27d..631971787 100644 --- a/packages/order-utils/test/assert_test.ts +++ b/packages/order-utils/test/assert_test.ts @@ -1,5 +1,4 @@ import * as chai from 'chai'; -import 'make-promises-safe'; import 'mocha'; import { assert } from '../src/assert'; diff --git a/packages/order-utils/test/exchange_transfer_simulator_test.ts b/packages/order-utils/test/exchange_transfer_simulator_test.ts index eeae42698..52385f611 100644 --- a/packages/order-utils/test/exchange_transfer_simulator_test.ts +++ b/packages/order-utils/test/exchange_transfer_simulator_test.ts @@ -2,7 +2,6 @@ import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils'; import { ExchangeContractErrs } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import 'make-promises-safe'; import { artifacts } from '../src/artifacts'; import { constants } from '../src/constants'; diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts index 7cf6435c2..cc8bfbf8f 100644 --- a/packages/order-utils/test/order_hash_test.ts +++ b/packages/order-utils/test/order_hash_test.ts @@ -1,7 +1,6 @@ import { Order } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import 'make-promises-safe'; import 'mocha'; import { constants, orderHashUtils } from '../src'; diff --git a/packages/order-utils/test/remaining_fillable_calculator_test.ts b/packages/order-utils/test/remaining_fillable_calculator_test.ts index c99d10f3f..a5a3b7fc6 100644 --- a/packages/order-utils/test/remaining_fillable_calculator_test.ts +++ b/packages/order-utils/test/remaining_fillable_calculator_test.ts @@ -2,7 +2,6 @@ import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; -import 'make-promises-safe'; import 'mocha'; import { RemainingFillableCalculator } from '../src/remaining_fillable_calculator'; diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index 74033104a..5714f9671 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -2,7 +2,6 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import { JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types'; import * as _ from 'lodash'; -import 'make-promises-safe'; import 'mocha'; import * as Sinon from 'sinon'; -- cgit From 64b6861880ecb129d824b011512b8ea070a6eff0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 22 Jun 2018 12:33:10 +0200 Subject: Skip failing tests temporarily --- packages/order-utils/test/order_hash_test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/order-utils/test') diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts index cc8bfbf8f..28bfcbafc 100644 --- a/packages/order-utils/test/order_hash_test.ts +++ b/packages/order-utils/test/order_hash_test.ts @@ -29,11 +29,15 @@ describe('Order hashing', () => { takerAssetAmount: new BigNumber(0), expirationTimeSeconds: new BigNumber(0), }; - it('calculates the order hash', async () => { + // HACK: Temporarily disable these tests until @dekz has time to fix. + // This allows us to get all tests running on CI immediately + it.skip('calculates the order hash', async () => { const orderHash = orderHashUtils.getOrderHashHex(order); expect(orderHash).to.be.equal(expectedOrderHash); }); - it('throws a readable error message if taker format is invalid', async () => { + // HACK: Temporarily disable these tests until @dekz has time to fix. + // This allows us to get all tests running on CI immediately + it.skip('throws a readable error message if taker format is invalid', async () => { const orderWithInvalidtakerFormat = { ...order, takerAddress: (null as any) as string, -- cgit From b2a4b7eb888131608d2526d806bc0461c31e8aef Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 22 Jun 2018 23:00:22 +1000 Subject: Fix known order hash value test --- packages/order-utils/test/order_hash_test.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'packages/order-utils/test') diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts index 28bfcbafc..0a6be83d0 100644 --- a/packages/order-utils/test/order_hash_test.ts +++ b/packages/order-utils/test/order_hash_test.ts @@ -12,8 +12,8 @@ const expect = chai.expect; describe('Order hashing', () => { describe('#getOrderHashHex', () => { - const expectedOrderHash = '0x367ad7730eb8b5feab8a9c9f47c6fcba77a2d4df125ee6a59cc26ac955710f7e'; - const fakeExchangeContractAddress = '0xb69e673309512a9d726f87304c6984054f87a93b'; + const expectedOrderHash = '0x434c6b41e2fb6dfcfe1b45c4492fb03700798e9c1afc6f801ba6203f948c1fa7'; + const fakeExchangeContractAddress = '0x1dc4c1cefef38a777b15aa20260a54e584b16c48'; const order: Order = { makerAddress: constants.NULL_ADDRESS, takerAddress: constants.NULL_ADDRESS, @@ -29,15 +29,11 @@ describe('Order hashing', () => { takerAssetAmount: new BigNumber(0), expirationTimeSeconds: new BigNumber(0), }; - // HACK: Temporarily disable these tests until @dekz has time to fix. - // This allows us to get all tests running on CI immediately - it.skip('calculates the order hash', async () => { + it('calculates the order hash', async () => { const orderHash = orderHashUtils.getOrderHashHex(order); expect(orderHash).to.be.equal(expectedOrderHash); }); - // HACK: Temporarily disable these tests until @dekz has time to fix. - // This allows us to get all tests running on CI immediately - it.skip('throws a readable error message if taker format is invalid', async () => { + it('throws a readable error message if taker format is invalid', async () => { const orderWithInvalidtakerFormat = { ...order, takerAddress: (null as any) as string, -- cgit