diff --git a/lib/runner.js b/lib/runner.js index 7cdaaa702..758bcfbe4 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -181,12 +181,15 @@ var runJasmineTests = function() { for (var i = 0; i < specs.length; ++i) { var matches = glob.sync(specs[i], {cwd: config.specFileBase}); if (!matches.length) { - throw new Error('Test file ' + specs[i] + ' did not match any files.'); + util.puts('Warning: pattern ' + specs[i] + ' did not match any files.'); } for (var j = 0; j < matches.length; ++j) { resolvedSpecs.push(path.resolve(config.specFileBase, matches[j])); } } + if (!resolvedSpecs.length) { + throw new Error('Spec patterns did not match any files.'); + } minijn.addSpecs(resolvedSpecs); // TODO: This should not be tied to the webdriver promise loop, it should use