Skip to content

Commit

Permalink
feat: parallel precommand execution
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed Aug 28, 2019
1 parent da5f45b commit a23e413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ async function runTests(options, parallel = false) {
if (!Array.isArray(options)) options = [options];

// run precommands
let preCommandsPromises = [];
for (let i = 0; i < options.length; i++) {
await runCommands(options[i].preCommand);
preCommandsPromises.push(runCommands(options[i].preCommand));
delete options[i].preCommand;
}
await Promise.all(preCommandsPromises);

let result;
if (parallel) {
Expand Down

0 comments on commit a23e413

Please sign in to comment.