diff options
-rw-r--r-- | packages/sol-compiler/package.json | 1 | ||||
-rw-r--r-- | packages/sol-compiler/test/compiler_test.ts | 4 | ||||
-rw-r--r-- | packages/sol-compiler/test/util/chai_setup.ts | 13 |
3 files changed, 16 insertions, 2 deletions
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 7cb07e970..cdc641044 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -61,6 +61,7 @@ "@types/semver": "^5.5.0", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", + "chai-bignumber": "^2.0.2", "copyfiles": "^1.2.0", "dirty-chai": "^2.0.1", "make-promises-safe": "^1.1.0", diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts index 4a3b6e4a7..4be77c01b 100644 --- a/packages/sol-compiler/test/compiler_test.ts +++ b/packages/sol-compiler/test/compiler_test.ts @@ -1,7 +1,6 @@ import { join } from 'path'; import * as chai from 'chai'; -import * as chaiAsPromised from 'chai-as-promised'; import 'mocha'; import { Compiler } from '../src/compiler'; @@ -9,9 +8,10 @@ import { fsWrapper } from '../src/utils/fs_wrapper'; import { CompilerOptions, ContractArtifact } from '../src/utils/types'; import { exchange_binary } from './fixtures/exchange_bin'; +import { chaiSetup } from './util/chai_setup'; import { constants } from './util/constants'; -chai.use(chaiAsPromised); +chaiSetup.configure(); const expect = chai.expect; describe('#Compiler', function(): void { diff --git a/packages/sol-compiler/test/util/chai_setup.ts b/packages/sol-compiler/test/util/chai_setup.ts new file mode 100644 index 000000000..1a8733093 --- /dev/null +++ b/packages/sol-compiler/test/util/chai_setup.ts @@ -0,0 +1,13 @@ +import * as chai from 'chai'; +import chaiAsPromised = require('chai-as-promised'); +import ChaiBigNumber = require('chai-bignumber'); +import * as dirtyChai from 'dirty-chai'; + +export const chaiSetup = { + configure(): void { + chai.config.includeStack = true; + chai.use(ChaiBigNumber()); + chai.use(dirtyChai); + chai.use(chaiAsPromised); + }, +}; |