Skip to content

Commit 06d7a2b

Browse files
authored
❄️ Fix flaky amp-auto-ads placement tests (ampproject#38656)
1 parent a6ea9db commit 06d7a2b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extensions/amp-auto-ads/0.1/test/test-ad-strategy.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {AmpAd} from 'extensions/amp-ad/0.1/amp-ad';
2+
13
import {AdStrategy} from '../ad-strategy';
24
import {AdTracker} from '../ad-tracker';
35
import {PlacementState, getPlacementsFromConfigObj} from '../placement';
@@ -33,6 +35,10 @@ describes.realWin(
3335
env.sandbox
3436
.stub(win.__AMP_BASE_CE_CLASS.prototype, 'whenBuilt')
3537
.callsFake(() => Promise.resolve());
38+
39+
// Stub actual amp-ad creation since we don't care about its behavior
40+
// here, only that they are created.
41+
env.sandbox.stub(AmpAd.prototype, 'buildCallback').resolves();
3642
});
3743

3844
it('should call placeAd with correct parameters', () => {

0 commit comments

Comments
 (0)