Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(runner): do not error out if only one spec pattern does not match…
Browse files Browse the repository at this point in the history
… any files

Previously, the runner would throw an error if any one of the spec patterns did not
match any files. Now it logs a warning in that case, and errors out only if there
are no found files in any spec patterns. Closes #260
  • Loading branch information
juliemr committed Nov 22, 2013
1 parent 579bcc4 commit a24eeee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a24eeee

Please sign in to comment.