aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/test
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-16 06:20:00 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-16 06:51:25 +0800
commit976d159e5275fa1fc0236fdd65c3acf40864657b (patch)
tree6a0ca36fd01677c902744edf12a504111703ec5a /packages/sol-compiler/test
parent455c78dfb1ee5a104964b70d0132438b86f6c437 (diff)
downloaddexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.gz
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.bz2
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.lz
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.xz
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.tar.zst
dexon-sol-tools-976d159e5275fa1fc0236fdd65c3acf40864657b.zip
follow chai_setup pattern
Diffstat (limited to 'packages/sol-compiler/test')
-rw-r--r--packages/sol-compiler/test/compiler_test.ts4
-rw-r--r--packages/sol-compiler/test/util/chai_setup.ts13
2 files changed, 15 insertions, 2 deletions
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);
+ },
+};