Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Gruntfile.js: Make sure paths are unique /after/ having stripped off …

…the index.html.

(cherry picked from commit 0f21e34)
  • Loading branch information...
commit b8b0911f826b8f31a9175d1740e3180898695e20 1 parent eca12c4
@gabrielschulhof gabrielschulhof authored
Showing with 11 additions and 7 deletions.
  1. +11 −7 Gruntfile.js
View
18 Gruntfile.js
@@ -361,7 +361,9 @@ module.exports = function( grunt ) {
urls: (function() {
// Find the test files
var suites = grunt.util._.without( ( grunt.option( "suites" ) || "" ).split( "," ), "" ),
- patterns, paths, idx, onePath = "", uniquePaths = [],
+ patterns, paths, idx,
+ onePath = "",
+ uniquePaths = [],
versionedPaths = [],
jQueries = grunt.util._.without( ( grunt.option( "jqueries" ) || "" ).split( "," ), "" );
@@ -374,18 +376,20 @@ module.exports = function( grunt ) {
patterns = [ "tests/unit/*/index.html", "tests/unit/*/*/index.html", "tests/unit/**/*-tests.html" ];
}
- paths = grunt.file.expand( patterns ).sort();
+ paths = grunt.file.expand( patterns )
+ .sort()
+ .map( function( path ) {
+ // Some of our tests (ie. navigation) don't like having the index.html too much
+ return path.replace( /\/\index.html$/, "/" );
+ });
+
for ( idx in paths ) {
if ( onePath !== paths[ idx ] ) {
onePath = paths[ idx ];
uniquePaths.push( onePath );
}
}
-
- uniquePaths.map( function( path ) {
- // Some of our tests (ie. navigation) don't like having the index.html too much
- return path.replace( /\/\index.html$/, "/" );
- });
+ paths = uniquePaths;
if ( jQueries.length ) {
paths.forEach( function( path ) {
Please sign in to comment.
Something went wrong with that request. Please try again.