You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: How to test calls to src/ajax in unit tests?
Description
I want to test that calls to src/ajax are called with the correct parameters for my custom adapter. The ajax request is used in the onTimeout and onBidWon callback. Because the ajax method is an exported function, it is not possible to stub it with sinon.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Question: How to test calls to
src/ajax
in unit tests?Description
I want to test that calls to
src/ajax
are called with the correct parameters for my custom adapter. The ajax request is used in theonTimeout
andonBidWon
callback. Because the ajax method is an exported function, it is not possible to stub it with sinon.Example Adapter Spec
Intended Unit Test
But the above does not work because sinon cannot spy on exported functions.
The text was updated successfully, but these errors were encountered: