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

Commit 901c8ff

Browse files
author
Gabriel Schulhof
committed
Build: Allow one to specify a specific test file within a suite
(cherry picked from commit 4638bba) Closes gh-7507 Fixes gh-7506
1 parent 2f45cb9 commit 901c8ff

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Gruntfile.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,11 +908,20 @@ module.exports = function( grunt ) {
908908
.forEach( function( suite ) {
909909
testDirs.forEach( function( dir ) {
910910
dir = "tests/" + dir;
911-
patterns = patterns.concat([
912-
dir + "/" + suite + "/index.html",
913-
dir + "/" + suite + "/*/index.html",
914-
dir + "/" + suite + "/**/*-tests.html"
915-
]);
911+
912+
if ( suite.indexOf( "/" ) >= 0 ) {
913+
914+
// If the suite is a path, then append it exactly
915+
patterns.push( dir + "/" + suite );
916+
} else {
917+
918+
// If not, append all patterns we care about
919+
patterns = patterns.concat([
920+
dir + "/" + suite + "/index.html",
921+
dir + "/" + suite + "/*/index.html",
922+
dir + "/" + suite + "/**/*-tests.html"
923+
]);
924+
}
916925
});
917926
});
918927

0 commit comments

Comments
 (0)