chore(traceur-jasmine): accept multiple specfile globs
This commit is contained in:
parent
6c59894a29
commit
28659efa69
|
@ -7,8 +7,20 @@ var path = require('path');
|
|||
require('traceur/bin/traceur-runtime.js');
|
||||
require('reflect-metadata/Reflect');
|
||||
|
||||
glob(process.argv[2], function (error, specFiles) {
|
||||
minijasminenode2.executeSpecs({
|
||||
// Support passing multiple globs
|
||||
var globsIndex = process.argv.indexOf('--');
|
||||
var args;
|
||||
if (globsIndex < 0) {
|
||||
args = [process.argv[2]];
|
||||
} else {
|
||||
args = process.argv.slice(globsIndex + 1);
|
||||
}
|
||||
|
||||
var specFiles = args.
|
||||
map(function(globstr) { return glob.sync(globstr); }).
|
||||
reduce(function(specFiles, paths) { return specFiles.concat(paths); }, []);
|
||||
|
||||
minijasminenode2.executeSpecs({
|
||||
includeStackTrace: true,
|
||||
defaultTimeoutInterval: 1000,
|
||||
showColors: process.argv.indexOf('--no-color') === -1,
|
||||
|
@ -16,5 +28,4 @@ glob(process.argv[2], function (error, specFiles) {
|
|||
onComplete: function(passed) {
|
||||
process.exit(passed ? 0 : 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue