diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-12-11 01:09:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 01:09:59 +0800 |
commit | a39e0f13be4d47ee79dd971d49835f6929fa71e7 (patch) | |
tree | 9bc2a11f27514c8ca46e24ac268899e95ebf6b49 /contracts/tokens/test/global_hooks.ts | |
parent | 190d9244cc5544662effae508f94025a6f5de286 (diff) | |
parent | a365ab11d24ff8365b7d69a948b1b5211b772f5e (diff) | |
download | dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar.gz dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar.bz2 dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar.lz dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar.xz dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.tar.zst dexon-sol-tools-a39e0f13be4d47ee79dd971d49835f6929fa71e7.zip |
Merge pull request #1388 from 0xProject/feature/contracts-monorepo-6
Contracts monorepo 6
Diffstat (limited to 'contracts/tokens/test/global_hooks.ts')
-rw-r--r-- | contracts/tokens/test/global_hooks.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contracts/tokens/test/global_hooks.ts b/contracts/tokens/test/global_hooks.ts new file mode 100644 index 000000000..f8ace376a --- /dev/null +++ b/contracts/tokens/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(); +}); |