add check for iterations and browser

This commit is contained in:
soulgalore 2018-04-20 21:50:23 +02:00
parent c60f20de1a
commit 0dd63e9804
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}