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: normalize URL before checking equality #5960

Merged
merged 2 commits into from
Sep 5, 2018
Merged

core: normalize URL before checking equality #5960

merged 2 commits into from
Sep 5, 2018

Conversation

paulirish
Copy link
Member

repro:

lighthouse http://paulirish.com --preset-perf -G
lighthouse http://paulirish.com --preset-perf -A

Error: Cannot run audit mode on different URL

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.

looks like the right thing to do.

The test failure in CI looks like the test was more or less accidentally passing before since it was comparing https://example.com and https://example.com/. I think it was written assuming comparison against finalUrl, which is quite different in that artifacts.json and it just worked so we didn't look into it.

Maybe change the url at

const opts = {url: 'https://example.com', config: generateConfig(settings), driverMock};
to something that's more obviously different than example.com?

@paulirish paulirish merged commit d3af6d0 into master Sep 5, 2018
@paulirish paulirish deleted the resolvedurl branch September 5, 2018 01:53
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.

None yet

2 participants