function invokeMochaAsync(args, opts = {}) {
  let mochaProcess;
  const resultPromise = new Promise((resolve, reject) => {
    mochaProcess = createSubprocess(
      defaultArgs([MOCHA_EXECUTABLE].concat(args)),
      (err, result) => {
        if (err) {
          reject(err);
        } else {
          resolve(result);
        }
      },
      opts
    );
  });
  return [mochaProcess, resultPromise];
}
Invokes the mocha binary with the given arguments. Returns the
child process and a promise for the results of running the
command. The promise resolves when the child process exits. The
result includes the **raw** string output, as well as exit code.

By default, `STDERR` is ignored. Pass `{stdio: 'pipe'}` as `opts` if you
want it as part of the result output.

@param {string[]} args - Array of args
@param {Object} [opts] - Opts for `spawn()`
@returns {[import('child_process').ChildProcess,Promise<RawResult>]} A tuple of process and result promise