aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-02-28 09:12:45 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-02-28 09:12:45 +0800
commit0987c9a7cfb1936469062b4cb6222158b5e110b7 (patch)
tree28c48558dfecac778dae881bd3a9cd34bc7a989c
parente48a3edacba891a18e641e01708e3d73fd6588ac (diff)
downloaddexon-0x-contracts-0987c9a7cfb1936469062b4cb6222158b5e110b7.tar.gz
dexon-0x-contracts-0987c9a7cfb1936469062b4cb6222158b5e110b7.tar.zst
dexon-0x-contracts-0987c9a7cfb1936469062b4cb6222158b5e110b7.zip
Write to provided output directory
-rw-r--r--packages/sra-report/src/index.ts20
1 files changed, 17 insertions, 3 deletions
diff --git a/packages/sra-report/src/index.ts b/packages/sra-report/src/index.ts
index bd0615480..fade07095 100644
--- a/packages/sra-report/src/index.ts
+++ b/packages/sra-report/src/index.ts
@@ -63,13 +63,27 @@ const mainAsync = async () => {
throw new Error('Could not get any orders from /orders endpoint');
}
const orderHash = ZeroEx.getOrderHashHex(firstOrder);
- const newmanRunOptions = {
+ const newmanEnvironmentOptions = {
collection: sraReportCollectionJSON,
- reporters: 'cli',
globals: postmanEnvironmentFactory.createGlobalEnvironment(args.url, orderHash),
environment: postmanEnvironmentFactory.createNetworkEnvironment(args.networkId),
};
+ const newmanReporterOptions = !_.isUndefined(args.output)
+ ? {
+ reporters: 'json',
+ reporter: {
+ json: {
+ export: args.output,
+ },
+ },
+ }
+ : {
+ reporters: 'cli',
+ };
+ const newmanRunOptions = {
+ ...newmanEnvironmentOptions,
+ ...newmanReporterOptions,
+ };
await newmanRunAsync(newmanRunOptions);
};
-
mainAsync().catch(utils.log);