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

fix failing unit test within quantcastBidAdapter #2879

Merged
merged 3 commits into from
Jul 23, 2018

Conversation

jsnellbaker
Copy link
Collaborator

Type of change

  • Refactoring (no functional changes, no api changes)
  • Other

Description of change

Since the inclusion of #2828 the Travis builds for master have been failing due to a failed unit test for IE 11 within the quantcastBIdAdapter_spec.js file. See job link:
https://travis-ci.org/prebid/Prebid.js/builds/406331258

This PR addresses the test failure by replacing the new URL() code (which isn't supported in IE) with a different set of code that performs the same action needed for the test.

CC @soarez

@@ -71,8 +71,8 @@ describe('Quantcast adapter', () => {

it('sends bid requests to Quantcast Canary Endpoint if `publisherId` is `test-publisher`', () => {
const requests = qcSpec.buildRequests([bidRequest]);
const url = new URL(requests[0]['url']);
expect(url.hostname).to.equal(QUANTCAST_TEST_DOMAIN);
const hostname = requests[0]['url'].split(/[:/]/)[3];
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jsnellbaker
Copy link
Collaborator Author

@jaiminpanchal27 Thanks for the feedback; I switched to the parse function.

@jsnellbaker jsnellbaker merged commit 8f4fc07 into master Jul 23, 2018
@jsnellbaker jsnellbaker deleted the quantcast_url_test_fix branch August 2, 2018 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants