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

EX-2588 Refactor sovrn bid adapter tests #33

Merged
merged 4 commits into from
Sep 16, 2021
Merged

EX-2588 Refactor sovrn bid adapter tests #33

merged 4 commits into from
Sep 16, 2021

Conversation

mikhalovich
Copy link

@mikhalovich mikhalovich commented Sep 13, 2021

No description provided.

@@ -1,291 +1,261 @@
import {expect} from 'chai';
import {spec} from 'modules/sovrnBidAdapter.js';
import {config} from 'src/config.js';

Choose a reason for hiding this comment

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

Could you please make all these format changes like excessive semicolons and apostrophes removal in a separate commit so we could focus on the actual logic change?

I would actually suggest a separate PR, but since this is a fork, a separate PR would be less conviniant

Choose a reason for hiding this comment

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

Actually let's make it a seperate PR, it will be easier for the prebid folks

Copy link

@egsgordeev egsgordeev left a comment

Choose a reason for hiding this comment

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

Preliminary LGTM with a few minors

'bidder': 'sovrn',
'params': {
'tagid': 403370
const baseBidRequest = {

Choose a reason for hiding this comment

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

Why is this renaming required?

});
});

describe('prebid 3 upgrade', function() {

Choose a reason for hiding this comment

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

Why is this no longer needed?

Choose a reason for hiding this comment

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

I agree, this test seems to still be necessary.

@@ -1,291 +1,261 @@
import {expect} from 'chai';
import {spec} from 'modules/sovrnBidAdapter.js';
import {config} from 'src/config.js';

Choose a reason for hiding this comment

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

Actually let's make it a seperate PR, it will be easier for the prebid folks

let result = spec.interpretResponse(response);
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedResponse[0]));
});
const expectedResponse = {

Choose a reason for hiding this comment

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

seems like you could address duplication here

'id': '546956d68c757f',
'seatbid': [
body: {
id: '546956d68c757f',

Choose a reason for hiding this comment

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

do we need this seperate data object or can we use the response above?

'body': {
'id': '546956d68c757f-2',
'seatbid': [
body: {

Choose a reason for hiding this comment

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

again, seems like there should be a way to use a single response object

Copy link

@jrosendahl jrosendahl left a comment

Choose a reason for hiding this comment

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

I think teh prebid 3 upgrade test needs to stay.

});
});

describe('prebid 3 upgrade', function() {

Choose a reason for hiding this comment

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

I agree, this test seems to still be necessary.

@mikhalovich mikhalovich merged commit 0b24b9c into master Sep 16, 2021
@egsgordeev egsgordeev deleted the EX-2588 branch September 16, 2021 15:19
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