-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple modules: attempt to reduce test flakiness, improved logging …
…for XHR mock race conditions (#8466) * Datablocks bid adapter: do not send metrics during tests * Log contents of XHR mock on test failure * Disable ajax for analytics adapters during tests * Do not assume that test setup did not fail
- Loading branch information
Showing
6 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {_internal} from '../../src/AnalyticsAdapter.js'; | ||
|
||
before(() => { | ||
// stub out analytics networking to avoid random events polluting the global xhr mock | ||
disableAjaxForAnalytics(); | ||
}) | ||
|
||
export function disableAjaxForAnalytics() { | ||
sinon.stub(_internal, 'ajax').callsFake(() => null); | ||
} | ||
export function enableAjaxForAnalytics() { | ||
_internal.ajax.restore(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters