Skip to content

Commit

Permalink
Add explicit reverb null config
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-magana committed Feb 7, 2025
1 parent 6718130 commit 0fd1c08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/lib/analyticsUtils/sendBeacon/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ describe('sendBeacon', () => {
},
};

// Simulates reverbParams set to null in ATIAnalytics and sendEventBeacon
// in the event useReverb resolves to 'false'
const reverbConfigWhenReverbIsDisabled = null;

const originalProcessEnv = process.env;

afterEach(() => {
Expand Down Expand Up @@ -124,7 +128,7 @@ describe('sendBeacon', () => {
});

it('should not call Reverb viewEvent if Reverb is not enabled for a service', async () => {
await sendBeacon('https://foobar.com', null);
await sendBeacon('https://foobar.com', reverbConfigWhenReverbIsDisabled);

Check failure on line 131 in src/app/lib/analyticsUtils/sendBeacon/index.test.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `'https://foobar.com',·reverbConfigWhenReverbIsDisabled` with `⏎··········'https://foobar.com',⏎··········reverbConfigWhenReverbIsDisabled,⏎········`

expect(reverbMock.viewEvent).not.toHaveBeenCalled();
});
Expand Down

0 comments on commit 0fd1c08

Please sign in to comment.