Skip to content

Commit

Permalink
Update test case calling setup before activate
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Winters committed Sep 15, 2022
1 parent bb04e66 commit 9833f03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Advertising.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ describe('When I instantiate an advertising main module, with APS', () => {
expect(global.apstag.setDisplayBids).toHaveBeenCalledTimes(0);
});

it('fetchBids and setDisplayBids should be called if setup is called', async () => {
it('fetchBids and setDisplayBids should be called if setup has been called', async () => {
await advertising.setup();

expect(global.apstag.fetchBids).toHaveBeenCalledTimes(0);
expect(global.apstag.setDisplayBids).toHaveBeenCalledTimes(0);

advertising.activate(DIV_ID_FOO);

expect(global.apstag.fetchBids).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit 9833f03

Please sign in to comment.