How to use the lighthouse/lighthouse-cli/chrome-launcher.js.ChromeLauncher function in lighthouse

To help you get started, we’ve selected a few lighthouse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github A-gambit / CSS-IN-JS-Benchmarks / packages / big-table-test / index.js View on Github external
function launchChromeAndRunLighthouse(url, flags, config) {
  const launcher = new ChromeLauncher({
    port: 9222,
    autoSelectChrome: true,
  });
  return launcher
    .isDebuggerReady()
    .catch(() => {
      if (flags.skipAutolaunch) {
        return;
      }
      return launcher.run();
    })
    .then(() => Lighthouse(url, flags, config))
    .then(results => launcher.kill().then(() => results))
    .catch(err => {
      return launcher.kill().then(() => {
        throw err;
github thearegee / lighthouse-cron / src / lighthouse.js View on Github external
function launchChrome(opts) {
  return new ChromeLauncher(opts);
}