From 9a93a06fbd61013f1e62cea054c92e11dfa561f1 Mon Sep 17 00:00:00 2001 From: David Petersen Date: Sun, 25 May 2014 16:27:24 -0500 Subject: [PATCH] Tests: Add widget option Allows running qunit tests for a single widget Closes gh-1254 --- Gruntfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 384b52ff3..386b2a238 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -75,7 +75,8 @@ var "dist/jquery-ui.js", "dist/jquery-ui.min.js" ] - }; + }, + component = grunt.option( "component" ) || "**"; function mapMinFile( file ) { return "dist/" + file.replace( /\.js$/, ".min.js" ).replace( /ui\//, "minified/" ); @@ -172,8 +173,7 @@ grunt.initConfig({ }) }, qunit: { - files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) { - // TODO except for all|index|test, try to include more as we go + files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) { return !( /(all|index|test)\.html$/ ).test( file ); }), options: { -- 2.39.5