diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-12 02:04:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 02:04:17 +0800 |
commit | e6c1c2a658cb6f821d200c5471d0a1d05a5d0042 (patch) | |
tree | bd0308705ff59708174d75c91b837029393952cd /contracts/protocol/test/global_hooks.ts | |
parent | eec9957831c3f12a0e3088b213cb765c2418b9c4 (diff) | |
parent | 36736f82d4cb2dcaef550ea593ed38a12fcf213a (diff) | |
download | dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar.gz dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar.bz2 dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar.lz dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar.xz dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.tar.zst dexon-0x-contracts-e6c1c2a658cb6f821d200c5471d0a1d05a5d0042.zip |
Merge pull request #1413 from 0xProject/feature/contracts-monorepo-7
Contracts monorepo 7
Diffstat (limited to 'contracts/protocol/test/global_hooks.ts')
-rw-r--r-- | contracts/protocol/test/global_hooks.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contracts/protocol/test/global_hooks.ts b/contracts/protocol/test/global_hooks.ts new file mode 100644 index 000000000..f8ace376a --- /dev/null +++ b/contracts/protocol/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(); +}); |