diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-06 04:33:34 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-06 04:33:34 +0800 |
commit | f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac (patch) | |
tree | e1b93ec089efa842372b885d51046c845728dd75 /contracts/utils/test/global_hooks.ts | |
parent | 5c29b918df4ac8b0f7914e8da10fa1ae530ff4e8 (diff) | |
parent | 08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c (diff) | |
download | dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.gz dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.bz2 dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.lz dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.xz dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.tar.zst dexon-sol-tools-f9e73d2a6f6b7c3126c0c10286c2f79c4fd2a7ac.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/instant-configurator
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(); +}); |