-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Admedia usersync #1923
Admedia usersync #1923
Conversation
unit tests should be added for the change. |
modules/admediaBidAdapter.js
Outdated
@@ -67,6 +69,16 @@ var AdmediaAdapter = function AdmediaAdapter() { | |||
|
|||
adloader.loadScript(endpoint); | |||
} | |||
|
|||
if (userSync.iframeEnabled) { | |||
userSync.registerSync('iframe', 'admedia', '//b.admedia.com/sync/iframe/'); |
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.
userSync.iframeEnabled
does not exist. You'd have to look at the config directly, like config.getConfig('userSync');
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.
Updated to use config.
Using config object and added unit tests. |
@devmusings looks like there's a conflict in |
}); | ||
|
||
it('should call usersync after default 3000 seconds', () => { | ||
window.setTimeout(function() { |
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.
A couple of problems with the setTimeout here.
- you're not using an async callback (usually called
done
) to notify the framework the test is finished. - if this works, its adding a 3 second delay every time the tests are run.
I think a better approach would be to test that your usersync.registerSync()
calls are happening as expected and let the usersync
module tests validate that they are triggered properly.
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.
Agreed. Updated the tests.
@devmusings |
Type of change
Description of change
Added usersync to Admedia's bidder.
Other information
Suggested updates per #1864