aboutsummaryrefslogblamecommitdiffstats
path: root/packages/contracts/test/global_hooks.ts
blob: 83263c5b37fd14a185c84b08eb8bc9f220fc5e13 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                    
                                                 
                                                 

                                               
                                                     
                                                                               

                                                       



                                                                               
   
import { env, EnvVars } from '@0xproject/dev-utils';

import { coverage } from '../src/utils/coverage';
import { profiler } from '../src/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();
    }
});