-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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): special case full-page-screenshot audit in filtering #11829
Conversation
Just throwing this alternative out there, put it in all of them just hidden? :) |
The property could go wherever feels good. The reasoning is that the desired behavior is basically exactly the same as stackPacks. Gathered and audited regardless of which audits are run or filtered out, and the results aren't used as an audit in the report, they're used to provide extra information in a bunch of other audits.
We could revive @adrianaixba's hidden audit PR :) |
I'd prefer this, but how much work does that entail? If we are pressed for time this PR seems fine to me, for now. |
Probably not worth it, IMO, but seemed like you were searching for alternatives :) I'd say we can just explore the |
We use Are you saying that it'd not be configurable to opt out of it running? |
@benschwarz you can still use |
here i wrote you a test :) it('should keep uncategorized audits even if onlyCategories is set', () => {
assert.ok(origConfig.audits.includes('full-page-screenshot'));
// f-p-s is non-categorized
const matchCategories = Object.values(origConfig.categories).filter(cat =>
cat.auditRefs.find(ref => ref.id === 'full-page-screenshot'));
assert.equal(matchCategories.length, 0);
const extended = {
extends: 'lighthouse:default',
settings: {
onlyCategories: ['accessibility'],
},
};
const config = new Config(extended);
assert.ok(config.audits.find(a => a.path.includes('full-page-screenshot')));
}); |
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.
Overall LGTM
coolio. @brendankenny is gonna write up an issue exploring our options for where we can take this. |
not pretty. potentially better than alternative (?), which is to ditch the FPS audit and make it a property of the LHR... (
lhr.fullPageScreenshot
).why: CDT uses
onlyCategories
, which means this audit is always skipped because it belongs to no category :(