From 7cb80fb018ddbcc72e15f9052f14574cba2bb2a2 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Thu, 16 May 2019 10:07:35 +0200 Subject: [PATCH] Error when no test files where matched --- bin/test-isolated | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/test-isolated b/bin/test-isolated index 762955e90..c0057a9d5 100755 --- a/bin/test-isolated +++ b/bin/test-isolated @@ -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))));