Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Lighthouse runner extension #281

Merged
merged 17 commits into from
Sep 14, 2022
Merged

feat: add Lighthouse runner extension #281

merged 17 commits into from
Sep 14, 2022

Conversation

adamraine
Copy link
Contributor

@adamraine adamraine commented Aug 31, 2022

We shouldn't merge this until LH 10.0 is released, but can still discuss until then.

Comment on lines +81 to +90
const lighthouseExtension = new LighthouseRunnerExtension(browser, page);
const runner = await createRunner(flow, lighthouseExtension);
const result = await runner.run();

await page.close();
await browser.close();

assert.ok(result);

return lighthouseExtension.createFlowResult();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to get some secondary result from the extension and this method made the most sense to me.

Another option is to add an onFlowResultCreated callback to the extension constructor or something.

@adamraine
Copy link
Contributor Author

I think this is good to land if we remove the peer dependency stuff. We can add the peer dependency stuff back once LH 10.0 releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants