aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/test-utils/src/global_hooks.ts
blob: 307dd0777b8857e84b7b9fffb5ed3d1897116558 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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();
    }
});