code: function getLocalMocha(basedir) {
      var indexPath = null;
      try {
          indexPath = resolve("mocha", {basedir: basedir});
      }
      catch (err) {
          debug("NOT FOUND", "\"mocha\"");
          return null;
      }
  
      var binPath = path.resolve(path.dirname(indexPath), "bin", "mocha");
      debug("FOUND", binPath);
      return binPath;
  }
docs: ------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ 
  Finds and tries executing a local mocha module.
  
  @param {string} basedir - A path of the directory that it starts searching.
  @returns {string|null} The path of a local mocha module.