Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
testrunner: refactored url-test-filter, still regex based
  • Loading branch information
jzaefferer committed Apr 24, 2008
1 parent 2efd0b4 commit f12d94a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/data/testrunner.js
Expand Up @@ -54,6 +54,11 @@ function start() {
}, 13);
}

function dontrun(name) {
var filter = location.search.slice(1);
return filter && !new RegExp(filter).test(encodeURIComponent(name));
}

function runTest() {
_config.blocking = false;
var time = new Date();
Expand All @@ -73,8 +78,7 @@ function test(name, callback, nowait) {
if(_config.currentModule)
name = _config.currentModule + " module: " + name;

var filter = location.search.slice(1);
if ( filter && !new RegExp(filter).test(encodeURIComponent(name)) )
if (dontrun(name))
return;

synchronize(function() {
Expand Down

0 comments on commit f12d94a

Please sign in to comment.