function resolveGlobs(list) {
  const options = {
    cwd: __dirname,
  };

  const resolved = [];
  for (const path of list) {
    for (const resolvedPath of glob.sync(path, options)) {
      resolved.push(resolvedPath);
    }
  }
  return resolved;
}
/*_external.js');
    }
  }

  // These are the test files that will be dynamically loaded by boot.js.
  clientArgs.testFiles = resolveGlobs(clientArgs.testFiles);

  const reporters = [];

  if (settings.reporters) {
    // Explicit reporters, use these.
    reporters.push(...settings.reporters);
  } else if (settings.logging && settings.logging != 'none') {
    // With logging, default to 'spec', which makes logs easier to associate
    // with individual tests.
    reporters.push('spec');
  } else {
    // Without logging, default to 'progress'.
    reporters.push('progress');
  }

  if (settings.html_coverage_report) {
    // Wipe out any old coverage reports to avoid confusion.
    rimraf.sync('coverage', {});  // Like rm -rf

    config.set({
      coverageReporter: {
        includeAllSources: true,
        reporters: [
          {type: 'html', dir: 'coverage'},
          {type: 'cobertura', dir: 'coverage', file: 'coverage.xml'},
          {type: 'json-summary', dir: 'coverage', file: 'coverage.json'},
          {type: 'json', dir: 'coverage', file: 'coverage-details.json'},
        ],
      },
    });

    // The report requires the 'coverage' reporter to be added to the list.
    reporters.push('coverage');
  }

  config.set({reporters: reporters});

  if (reporters.includes('spec') && settings.spec_hide_passed) {
    config.set({specReporter: {suppressPassed: true}});
  }

  if (settings.random) {
    // If --seed was specified use that value, else generate a seed so that the
    // exact order can be reproduced if it catches an issue.
    const seed = settings.seed == null ? new Date().getTime() : settings.seed;

    // Run tests in a random order.
    clientArgs.random = true;
    clientArgs.seed = seed;

    console.log('Using a random test order (--random) with --seed=' + seed);
  }

  if (settings.tls_key && settings.tls_cert) {
    config.set({
      protocol: 'https',
      httpsServerOptions: {
        key: fs.readFileSync(settings.tls_key),
        cert: fs.readFileSync(settings.tls_cert),
      },
    });
  }
};

/**
Resolves a list of paths using globs into a list of explicit paths.
Paths are all relative to the source directory.

@param {!Array<string>} list
@return {!Array<string>}