Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

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
(cherry picked from commit 4638bba)

Closes gh-7507
Fixes gh-7506
  • Loading branch information
Gabriel Schulhof committed Jul 31, 2014
1 parent 2f45cb9 commit 901c8ff
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Gruntfile.js
Expand Up @@ -908,11 +908,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 901c8ff

Please sign in to comment.