diff --git a/cli.js b/cli.js index f1218df28..b9f5490aa 100755 --- a/cli.js +++ b/cli.js @@ -212,9 +212,8 @@ function init(files) { fileCount = files.length; - var tests = files.map(run); - - return Promise.all(tests); + return cli.flags.serial ? Promise.mapSeries(files, run) + : Promise.all(files.map(run)); }); }