Skip to content

Commit

Permalink
fix: test coverage fix (#61)
Browse files Browse the repository at this point in the history
test coverage fix
  • Loading branch information
ioanna0 authored Oct 14, 2020
1 parent 5f1f40d commit be88c20
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/third-party-tags/remarketing.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ThirdPartyTag } from '../types';
import { remarketing } from './remarketing';

describe('remarketing', () => {
Expand All @@ -10,4 +11,13 @@ describe('remarketing', () => {
onLoad: remarketingTag.onLoad,
});
});

it('should call google_trackConversion onLoad', () => {
window.google_trackConversion = jest.fn();
const remarketingTag: ThirdPartyTag = remarketing({ shouldRun: true });
if (remarketingTag.onLoad) {
remarketingTag.onLoad();
expect(window.google_trackConversion).toHaveBeenCalled();
}
});
});

0 comments on commit be88c20

Please sign in to comment.