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



                                                                        
                                               
                                                     
                                                                               

                                                       



                                                                               
                    
   
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();
});