diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-05 23:15:44 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-05 23:15:44 +0800 |
commit | 00dbddc1aafd56c352e7a8905338d81e236b1fa1 (patch) | |
tree | c8462eb4e6882a39dec601b990f75761b4897ce8 /contracts/utils/test/global_hooks.ts | |
parent | b552c2bd0c5090629a96bc6b0e032cb85d9c52b3 (diff) | |
parent | b411e2250aed82b87d1cbebf5cf805d794ddbdb7 (diff) | |
download | dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar.gz dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar.bz2 dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar.lz dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar.xz dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.tar.zst dexon-sol-tools-00dbddc1aafd56c352e7a8905338d81e236b1fa1.zip |
Merge remote-tracking branch 'upstream/development' into website
# Conflicts:
# packages/website/package.json
# packages/website/ts/style/colors.ts
Diffstat (limited to 'contracts/utils/test/global_hooks.ts')
-rw-r--r-- | contracts/utils/test/global_hooks.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contracts/utils/test/global_hooks.ts b/contracts/utils/test/global_hooks.ts new file mode 100644 index 000000000..f8ace376a --- /dev/null +++ b/contracts/utils/test/global_hooks.ts @@ -0,0 +1,17 @@ +import { env, EnvVars } from '@0x/dev-utils'; + +import { coverage, profiler, provider } from '@0x/contracts-test-utils'; +before('start web3 provider', () => { + provider.start(); +}); +after('generate coverage report', async () => { + if (env.parseBoolean(EnvVars.SolidityCoverage)) { + const coverageSubprovider = coverage.getCoverageSubproviderSingleton(); + await coverageSubprovider.writeCoverageAsync(); + } + if (env.parseBoolean(EnvVars.SolidityProfiler)) { + const profilerSubprovider = profiler.getProfilerSubproviderSingleton(); + await profilerSubprovider.writeProfilerOutputAsync(); + } + provider.stop(); +}); |