Skip to content

Commit

Permalink
Added stub_gpp_ccpa
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsola-guardian committed Aug 18, 2023
1 parent 7d12a7b commit 135f335
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/stub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { stub_ccpa } from './stub_ccpa';
import { stub_gpp_ccpa } from './stub_gpp_ccpa';
import { stub_tcfv2 } from './stub_tcfv2';
import type { Framework } from './types';

Expand All @@ -8,5 +9,8 @@ export const stub = (framework: Framework): void => {
// that it should take precedence over __uspapi
// documentation.sourcepoint.com/implementation/web-implementation/multi-campaign-web-implementation#stub-file
if (framework === 'tcfv2') stub_tcfv2();
else stub_ccpa();
else {
stub_ccpa();
stub_gpp_ccpa();
};
};
3 changes: 3 additions & 0 deletions src/stub_gpp_ccpa.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable -- this is third party code */
/* istanbul ignore file */

export const stub_gpp_ccpa = () => {
(window.__gpp_addFrame = function (e) {
if (!window.frames[e]) {
Expand Down

1 comment on commit 135f335

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 92.48% 246/266
🟢 Branches 83.19% 94/113
🟢 Functions 90% 63/70
🟢 Lines 92.22% 237/257

Test suite run success

328 tests passing in 16 suites.

Report generated by 🧪jest coverage report action from 135f335

Please sign in to comment.