From 0dd63e980488409901aef18b45fdf4240d53cd64 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Fri, 20 Apr 2018 21:50:23 +0200 Subject: [PATCH] add check for iterations and browser --- lib/cli/cli.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 96036a325..eca24ef21 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -19,6 +19,15 @@ function validateInput(argv) { if (argv.headless && (argv.video || argv.visualMetrics)) { return 'You cannot combine headless with video/visualMetrics because they need a screen to work.'; } + + if (Array.isArray(argv.browsertime.iterations)) { + return 'Ooops you passed number of iterations twice, remove one of them and try again.'; + } + + if (Array.isArray(argv.browser)) { + return 'You can only run with one browser at a time.'; + } + return true; }