Browse Source

api#run should return runStatus even when no files are found (#839)

browser-support
Nuno Campos 9 years ago
committed by Mark Wubben
parent
commit
ee76aa9f4f
  1. 2
      api.js
  2. 8
      test/cli.js

2
api.js

@ -105,7 +105,7 @@ Api.prototype._run = function (files, _options) {
file: undefined file: undefined
}); });
return Promise.resolve([]); return Promise.resolve(runStatus);
} }
var cacheEnabled = self.options.cacheEnabled !== false; var cacheEnabled = self.options.cacheEnabled !== false;

8
test/cli.js

@ -290,3 +290,11 @@ test('handles NODE_PATH', function (t) {
t.end(); t.end();
}); });
}); });
test('works when no files are found', function (t) {
execCli('!*', function (err, stdout, stderr) {
t.is(err.code, 1);
t.match(stderr, 'Couldn\'t find any files to test');
t.end();
});
});

Loading…
Cancel
Save