async function runLighthouse(url, config, logger, testRunnerOptions = {}) {
  logger = logger || new LocalConsole();

  const worker = new Worker(new URL(import.meta.url), {
    stdout: true,
    stderr: true,
    workerData: {url, config, testRunnerOptions},
  });
  worker.stdout.setEncoding('utf8');
  worker.stderr.setEncoding('utf8');
  worker.stdout.addListener('data', (data) => {
    logger.log(`[STDOUT] ${data}`);
  });
  worker.stderr.addListener('data', (data) => {
    logger.log(`[STDERR] ${data}`);
  });
  const [workerResponse] = await once(worker, 'message');

  if (workerResponse.type === 'error') {
    const log = logger.getLog();
    throw new Error(`Worker returned an error: ${workerResponse.value}\nLog:\n${log}\n`);
  }

  const result = workerResponse.value;
  if (!result.lhr || !result.assetsDir) {
    throw new Error(`invalid response from worker:\n${JSON.stringify(result, null, 2)}`);
  }

  const artifacts = loadArtifacts(result.assetsDir);
  fs.rmSync(result.assetsDir, {recursive: true});

  return {
    lhr: result.lhr,
    artifacts,
  };
}
Launch Chrome and do a full Lighthouse run via the Lighthouse DevTools bundle.
@param {string} url
@param {LH.Config=} config
@param {LocalConsole=} logger
@param {Smokehouse.SmokehouseOptions['testRunnerOptions']=} testRunnerOptions
@return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts}>}