Skip to content

Commit 9a93a06

Browse files
committed
Tests: Add widget option
Allows running qunit tests for a single widget Closes jquerygh-1254
1 parent 203b23a commit 9a93a06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ var
7575
"dist/jquery-ui.js",
7676
"dist/jquery-ui.min.js"
7777
]
78-
};
78+
},
79+
component = grunt.option( "component" ) || "**";
7980

8081
function mapMinFile( file ) {
8182
return "dist/" + file.replace( /\.js$/, ".min.js" ).replace( /ui\//, "minified/" );
@@ -172,8 +173,7 @@ grunt.initConfig({
172173
})
173174
},
174175
qunit: {
175-
files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
176-
// TODO except for all|index|test, try to include more as we go
176+
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
177177
return !( /(all|index|test)\.html$/ ).test( file );
178178
}),
179179
options: {

0 commit comments

Comments
 (0)