Skip to content

Commit 096f338

Browse files
Address PR Comments
1 parent 8c51198 commit 096f338

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cookieSyncManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function CookieSyncManager(
120120
this.combineUrlWithRedirect = (
121121
mpid: MPID,
122122
pixelUrl: string,
123-
redirectUrl
123+
redirectUrl: string,
124124
): string => {
125125
const url = replaceMPID(pixelUrl, mpid);
126126
const redirect = redirectUrl ? replaceMPID(redirectUrl, mpid) : '';

test/jest/cookieSyncManager.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,11 @@ describe('CookieSyncManager', () => {
562562

563563
const result = cookieSyncManager.combineUrlWithRedirect(
564564
'1234',
565-
'https://test.com',
566-
'?redirect=https://redirect.com&mpid=%%mpid%%',
565+
'https://test.com/some/path',
566+
'https://redirect.mparticle.com/v1/sync?esid=1234&MPID=%%mpid%%&ID=$UID&Key=testMPID&env=2'
567567
);
568568

569-
expect(result).toBe('https://test.com%3Fredirect%3Dhttps%3A%2F%2Fredirect.com%26mpid%3D1234');
569+
expect(result).toBe('https://test.com/some/pathhttps%3A%2F%2Fredirect.mparticle.com%2Fv1%2Fsync%3Fesid%3D1234%26amp%3BMPID%3D1234%26amp%3BID%3D%24UID%26amp%3BKey%3DtestMPID%26amp%3Benv%3D2');
570570
});
571571

572572
it('should return the pixelUrl if no redirectUrl is defined', () => {

0 commit comments

Comments
 (0)