Tests: Fixed param parsing for compound test suites.

This commit is contained in:
Scott González 2011-07-28 14:50:06 -04:00
parent cec60ab3c3
commit 61caba7803

View File

@ -13,7 +13,7 @@
<script> <script>
(function() { (function() {
var params = "", var params = [],
suites = [ suites = [
"accordion/accordion.html", "accordion/accordion.html",
"accordion/accordion_deprecated.html", "accordion/accordion_deprecated.html",
@ -41,11 +41,15 @@
]; ];
$.each( QUnit.urlParams, function( key, value ) { $.each( QUnit.urlParams, function( key, value ) {
params += encodeURIComponent( key ) + "=" + encodeURIComponent( value ); if ( key === "filter" ) {
return;
}
params.push( encodeURIComponent( key ) + "=" + encodeURIComponent( value ) );
}); });
if ( params ) { if ( params.length ) {
params = "?" + params.join( "&" );
suites = $.map( suites, function( suite ) { suites = $.map( suites, function( suite ) {
return suite + "?" + params; return suite + params;
}); });
} }
QUnit.testSuites( suites ); QUnit.testSuites( suites );