Skip to content

Commit

Permalink
Build: Allow one to specify a specific test file within a suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof authored and agcolom committed Nov 26, 2014
1 parent cf185f8 commit 5e1c325
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Gruntfile.js
Expand Up @@ -907,11 +907,20 @@ module.exports = function( grunt ) {
.forEach( function( suite ) {
testDirs.forEach( function( dir ) {
dir = "tests/" + dir;
patterns = patterns.concat([
dir + "/" + suite + "/index.html",
dir + "/" + suite + "/*/index.html",
dir + "/" + suite + "/**/*-tests.html"
]);

if ( suite.indexOf( "/" ) >= 0 ) {

// If the suite is a path, then append it exactly
patterns.push( dir + "/" + suite );
} else {

// If not, append all patterns we care about
patterns = patterns.concat([
dir + "/" + suite + "/index.html",
dir + "/" + suite + "/*/index.html",
dir + "/" + suite + "/**/*-tests.html"
]);
}
});
});

Expand Down

0 comments on commit 5e1c325

Please sign in to comment.