Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Not possible to include js files referenced by relative path in test files #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ var path = require('path'),
run: true,
quiet: false,
exitOnFail: false
}, newPath, paths, a, p, t, v, concurrent,
}, newPath, paths, a, p, t, v, concurrent, globPattern,
getPaths = function(opt) {
var g = glob.sync(opt, {
cwd: process.cwd()
}).map(function (filepath) {
return path.join(process.cwd(), filepath);
});
if (g && g.length) {
options.paths = [].concat(options.paths, g);
options.paths = options.paths.concat(g);
}
};

Expand Down Expand Up @@ -94,6 +92,10 @@ var path = require('path'),
throw('-p requires an argument');
}
break;
case "-g":
globPattern = args.shift();
getPaths(globPattern);
break;
case "-f":
case "--fail":
options.exitOnFail = true;
Expand Down Expand Up @@ -124,6 +126,7 @@ var path = require('path'),
console.log(' as the list of files to process.');
console.log(' -p, --prefix <string> String to prefix to all urls (for dynamic server names)');
console.log(' -S, --suffix <string> String to add to the end of all urls (for dynamic server names)');
console.log(' -g retrieve yui test files by a specified glob pattern');
console.log(' -o, --outfile <path to export file>');
console.log(' You can specify an export type with the following:');
console.log(' --tap TAP export (default)');
Expand Down