From 1f4b2607cca815ffb72f3e6e37af06202c6facc2 Mon Sep 17 00:00:00 2001 From: kumaran-14 Date: Mon, 13 Apr 2020 22:36:33 +0530 Subject: [PATCH] Replace flatMap method with reduce and map --- bin/test_api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test_api.js b/bin/test_api.js index 38e9af3e8..1f40363f7 100644 --- a/bin/test_api.js +++ b/bin/test_api.js @@ -21,7 +21,7 @@ let flagArgs = []; if (process.argv.length > 2) { const args = process.argv.slice(2); - flagArgs = args.filter(e => e.startsWith('--')).flatMap(arg => arg.split('=')); + flagArgs = args.filter(e => e.startsWith('--')).map(arg => arg.split('=')).reduce((arr, val) => arr.concat([...val], [])); console.info(flagArgs); // ability to inject particular test files via // yarn test [testFileA testFileB ...]