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

core: de-dupe URLs in is-on-http, uses-http2 #4950

Merged
merged 4 commits into from
Apr 11, 2018
Merged

core: de-dupe URLs in is-on-http, uses-http2 #4950

merged 4 commits into from
Apr 11, 2018

Conversation

patrickhulce
Copy link
Collaborator

should fix our recent CI flakes too :)

@@ -35,13 +35,13 @@ module.exports = [
extendedInfo: {
value: {
results: {
length: 18,
Copy link
Member

Choose a reason for hiding this comment

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

i kinda like being so explicit, though ideally in failure we see exactly where the difference is.

can we avoid dropping back to >15 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

:( alright

};
});
Copy link
Member

Choose a reason for hiding this comment

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

instead of this dance should we just do this instead:

const uniqueUrls = Array.from(new Set(resources));

Copy link
Member

Choose a reason for hiding this comment

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

const uniqueUrls = Array.from(new Set(resources));

unfortunately won't dedupe because it's an object, so they'll all be unique.

We could add it to the filter instead, the Boolean thing is pretty ugly :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we're moving this to replace .filter(Boolean)


const headings = [
{key: 'url', itemType: 'url', text: 'Insecure URL'},
];

return {
rawValue: insecureRecords.length === 0,
rawValue: insecureURLs.length === 0,
Copy link
Member

Choose a reason for hiding this comment

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

why not items

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, doesn't matter :)

@patrickhulce
Copy link
Collaborator Author

how's it lookin' now @paulirish ?

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulirish paulirish merged commit ff4f111 into master Apr 11, 2018
@paulirish paulirish deleted the https_as_set branch April 11, 2018 00:15
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.

4 participants