diff options
author | F. Eugene Aumson <gene@aumson.org> | 2018-08-16 06:20:00 +0800 |
---|---|---|
committer | F. Eugene Aumson <gene@aumson.org> | 2018-08-16 06:51:25 +0800 |
commit | 976d159e5275fa1fc0236fdd65c3acf40864657b (patch) | |
tree | 6a0ca36fd01677c902744edf12a504111703ec5a /packages/sol-compiler | |
parent | 455c78dfb1ee5a104964b70d0132438b86f6c437 (diff) | |
download | dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.gz dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.zst dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.zip |
follow chai_setup pattern
Diffstat (limited to 'packages/sol-compiler')
-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); + }, +}; |