diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-05-11 05:22:49 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-05-19 08:01:05 +0800 |
commit | 9b1015bbce81b3f2a245e3dab6eea7c9028ce93b (patch) | |
tree | 3c698977176d907e04a8cfe0716f5d1f36167398 /packages/metacoin | |
parent | a4c821eb60c227df4512d6c24ce0e5239b8bb6ce (diff) | |
download | dexon-sol-tools-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.tar.gz dexon-sol-tools-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.tar.zst dexon-sol-tools-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.zip |
Atomic Order Matching - Tests
Diffstat (limited to 'packages/metacoin')
-rw-r--r-- | packages/metacoin/test/utils/chai_setup.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/metacoin/test/utils/chai_setup.ts b/packages/metacoin/test/utils/chai_setup.ts index 1a8733093..49259a368 100644 --- a/packages/metacoin/test/utils/chai_setup.ts +++ b/packages/metacoin/test/utils/chai_setup.ts @@ -1,3 +1,4 @@ +import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import chaiAsPromised = require('chai-as-promised'); import ChaiBigNumber = require('chai-bignumber'); @@ -9,5 +10,12 @@ export const chaiSetup = { chai.use(ChaiBigNumber()); chai.use(dirtyChai); chai.use(chaiAsPromised); + + // Node uses '.inspect()' instead of '.toString()' for log messages + // HACK: Typescript won't allow me to mess with BigNumber.prototype + // directly, so I create an instance and then get the prototype. + Object.getPrototypeOf(new BigNumber(0)).inspect = function() { + return this.toString(); + }; }, }; |