aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange-forwarder/test/global_hooks.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2019-01-22 13:32:59 +0800
committerAmir Bandeali <abandeali1@gmail.com>2019-01-22 13:41:22 +0800
commitefbfd08aa0152bf82d293fab0b073e1d650c9ab1 (patch)
treeb7fea548337a7e1d409ba08917582eec77678c24 /contracts/exchange-forwarder/test/global_hooks.ts
parentf9c29c3e7421bc8bcb59316e366249d1b0efb407 (diff)
downloaddexon-0x-contracts-efbfd08aa0152bf82d293fab0b073e1d650c9ab1.tar.gz
dexon-0x-contracts-efbfd08aa0152bf82d293fab0b073e1d650c9ab1.tar.zst
dexon-0x-contracts-efbfd08aa0152bf82d293fab0b073e1d650c9ab1.zip
Separate forwarder into own package
Diffstat (limited to 'contracts/exchange-forwarder/test/global_hooks.ts')
-rw-r--r--contracts/exchange-forwarder/test/global_hooks.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/contracts/exchange-forwarder/test/global_hooks.ts b/contracts/exchange-forwarder/test/global_hooks.ts
new file mode 100644
index 000000000..f8ace376a
--- /dev/null
+++ b/contracts/exchange-forwarder/test/global_hooks.ts
@@ -0,0 +1,17 @@
+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();
+});