-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(config): specify lighthouse channel #7312
Changes from all commits
b65cf2b
53409d3
670dd8a
128ebeb
0079086
f6f18a3
918211d
57911e6
3b1c12b
5400d8f
80ba8ec
86b7752
3ae323a
4b10b87
ee65c61
8cfe9a6
88e0e2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ describe('Lighthouse chrome extension', function() { | |
let browser; | ||
let extensionPage; | ||
let originalManifest; | ||
let lhr; | ||
|
||
function getAuditElementsIds({category, selector}) { | ||
return extensionPage.evaluate( | ||
|
@@ -102,6 +103,8 @@ describe('Lighthouse chrome extension', function() { | |
throw new Error(lighthouseResult.exceptionDetails.text); | ||
} | ||
|
||
lhr = lighthouseResult.result.value.lhr; | ||
|
||
extensionPage = (await browser.pages()).find(page => | ||
page.url().includes('blob:chrome-extension://') | ||
); | ||
|
@@ -176,4 +179,8 @@ describe('Lighthouse chrome extension', function() { | |
// this audit has regressed in the extension twice, so make sure it passes | ||
assert.ok(await extensionPage.$('#is-crawlable.lh-audit--pass'), 'did not pass is-crawlable'); | ||
}); | ||
|
||
it('should specify the channel as extension', async () => { | ||
assert.equal(lhr.configSettings.channel, 'extension'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 👍 |
||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,7 @@ function getFlags(manualArgv) { | |
.array('skipAudits') | ||
.array('output') | ||
.string('extraHeaders') | ||
.string('channel') | ||
.string('precomputedLanternDataPath') | ||
.string('lanternDataOutputPath') | ||
|
||
|
@@ -146,6 +147,7 @@ function getFlags(manualArgv) { | |
.default('port', 0) | ||
.default('hostname', 'localhost') | ||
.default('enable-error-reporting', undefined) // Undefined so prompted by default | ||
.default('channel', 'cli') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can assert this in |
||
.check(/** @param {LH.CliFlags} argv */ (argv) => { | ||
// Lighthouse doesn't need a URL if... | ||
// - We're just listing the available options. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ const defaultSettings = { | |
disableStorageReset: false, | ||
disableDeviceEmulation: false, | ||
emulatedFormFactor: 'mobile', | ||
channel: 'node', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and can assert this in |
||
|
||
// the following settings have no defaults but we still want ensure that `key in settings` | ||
// in config will work in a typechecked way | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3175,6 +3175,7 @@ | |
"disableStorageReset": false, | ||
"disableDeviceEmulation": false, | ||
"emulatedFormFactor": "mobile", | ||
"channel": "cli", | ||
mattzeunert marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should it also be in the top level of the LHR? Maybe inside There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a benefit over using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
because it's not really a setting, but now it kind of is, so that's fine |
||
"locale": "en-US", | ||
"blockedUrlPatterns": null, | ||
"additionalTraceCategories": null, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can assert this in
lightrider-entry-test.js