function getTestUrls(testFolder, testPrefix) {
  var prefixes = testPrefix ?
      (typeof(testPrefix) == 'string' ? [testPrefix] : testPrefix) :
      [];
  var positivePatterns = [];
  var negativePatterns = [];
  prefixes.forEach(function(pattern) {
    if (pattern.substring(0, 1) != '-') {
      positivePatterns.push(pattern);
    } else {
      negativePatterns.push(pattern.slice(1));
    }
  });

  var hasPattern = function(fileName, patterns) {
    return patterns.some(function(pattern) {
      return fileName.indexOf(pattern) != -1;
    });
  };

  var relativeTestUrls = glob.sync(testFolder + '/**/*_test.js').map(
      function(fileName) {
        var prefixLength = testFolder.length + 1;
        return fileName.substr(prefixLength);
      }).filter(
      function(fileName) {
        var hasPositivePattern = positivePatterns.length == 0 ||
            hasPattern(fileName, positivePatterns);
        var hasNegativePattern = hasPattern(fileName, negativePatterns);
        return testPrefix == null ? true :
            (hasPositivePattern && !hasNegativePattern);
      }).map(
      function(fileName) {
        return fileName.replace(/\.js$/, '.html');
      });

  return relativeTestUrls.map(
      function(url) {
        return 'http://localhost:8000/html/' + url;
      });
}
@param {string} testFolder The folder where the tests reside.
@param {?string|?Array<string>} testPrefix Only tests that match the prefix
    will be returned. If null, all tests will run.
@return {!Array<string>} A list of all matching testing URLs.