Error when no test files where matched

This commit is contained in:
Mariusz Nowak 2019-05-16 10:07:35 +02:00
parent 8fcfee6168
commit 7cb80fb018
No known key found for this signature in database
GPG Key ID: AA6F4CCD415BF299

View File

@ -46,6 +46,11 @@ const run = path => {
};
globby(patterns).then(paths => {
if (!paths.length) {
process.stderr.write(chalk.red.bold('No test files matched\n\n'));
process.exit(1);
}
const limit = pLimit(processesCount);
return Promise.all(paths.map(path => limit(() => run(path))));