function createTestModule(script, moduleName) {
  var sliceIndex = script.indexOf('/') + 1;
  var target = 'html/' + script.slice(sliceIndex, -2) + 'html';
  var level = target.match(/\//g).length;
  var prefix = new Array(level).join('../') + '../';

  var firebaseSpecial = getFirebaseSpecial(script);
  var contents =
      '<!DOCTYPE html>\r\n' +
      '<html>\r\n' +
      '  <head>\r\n' +
      '    <meta charset="utf-8" />\r\n' +
      '    <title>' + pathMod.basename(target).slice(0, -5) + '</title>\r\n' +
      '    <script src="' + prefix + 'closure/goog/base.js"></script>\r\n' +
      '    <script src="' + prefix + 'deps.js"></script>\r\n' +
      firebaseSpecial +
      '    <script>' + genModuleDeps(script) + '</script>\r\n' +
      '    <script>goog.require(\'' + moduleName + '\');\r\n' +
      '    </script>\r\n' +
      '  </head>\r\n' +
      '</html>\r\n';

  fsMod.ensureDirSync(pathMod.dirname(target));
  fsMod.writeFileSync(target, contents);

  return target;
}
@param {string} script Path of the script, e.g. tests/foo_test.js.
@param {string} moduleName Test module name.
@return {string} Generated file path.