aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/core/test/global_hooks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/core/test/global_hooks.ts')
-rw-r--r--contracts/core/test/global_hooks.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/contracts/core/test/global_hooks.ts b/contracts/core/test/global_hooks.ts
new file mode 100644
index 000000000..2e9ac9e21
--- /dev/null
+++ b/contracts/core/test/global_hooks.ts
@@ -0,0 +1,15 @@
+import { env, EnvVars } from '@0x/dev-utils';
+
+import { coverage } from './utils/coverage';
+import { profiler } from './utils/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();
+ }
+});