From 0faa8b3231ddfc15723a4bdda0b6ed7aeb742bd4 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 23 Nov 2018 14:03:48 +0100 Subject: Refactor contracts-core into contracts-multisig, contracts-core and contracts-test-utils --- contracts/test-utils/src/global_hooks.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contracts/test-utils/src/global_hooks.ts (limited to 'contracts/test-utils/src/global_hooks.ts') diff --git a/contracts/test-utils/src/global_hooks.ts b/contracts/test-utils/src/global_hooks.ts new file mode 100644 index 000000000..307dd0777 --- /dev/null +++ b/contracts/test-utils/src/global_hooks.ts @@ -0,0 +1,15 @@ +import { env, EnvVars } from '@0x/dev-utils'; + +import { coverage } from './coverage'; +import { profiler } from './profiler'; + +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(); + } +}); -- cgit v1.2.3