added **/*-tests.html glob convention to the test suite runner to make it easier to include seperate files in the suite

This commit is contained in:
John Bender 2011-08-15 12:09:56 -07:00
parent 5c40e69c3a
commit 5b4a29e643
4 changed files with 7 additions and 5 deletions

View file

@ -13,6 +13,8 @@
closedir($handle);
}
sort($directories);
echo json_encode( array('directories' => $directories ));
$test_pages = array_merge($directories, glob("**/*-tests.html"));
sort($test_pages);
echo json_encode( array('testPages' => $test_pages));
?>

View file

@ -58,7 +58,7 @@ $(function() {
exec: function( data ) {
var template = self.$frameElem.attr( "data-src" );
$.each( data.directories, function(i, dir) {
$.each( data.testPages, function(i, dir) {
QUnit.asyncTest( dir, function() {
self.dir = dir;
self.$frameElem.one( "load", self.onFrameLoad );

View file

@ -261,7 +261,7 @@
resetHash,
function(){
$.mobile.changePage( "cached-tests.html" );
$.mobile.changePage( "cached.html" );
},
function(){
@ -293,7 +293,7 @@
resetHash,
function(){
$.mobile.changePage( "cached-tests.html" );
$.mobile.changePage( "cached.html" );
},
function(){