Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FSSDK-8184] override attribute bug fix of track method #287

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[FSSDK-8184] new case addition
junaed-optimizely committed Nov 6, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
HighCrit HighCrit
commit 99c53b9f872fe64d867640825f2766ccb2a1a9a4
8 changes: 8 additions & 0 deletions src/client.spec.ts
Original file line number Diff line number Diff line change
@@ -1430,6 +1430,14 @@ describe('ReactSDKClient', () => {
expect(mockFn).toHaveBeenCalledTimes(1);
expect(mockFn).toHaveBeenCalledWith('evt1', 'user1', { bla: 'bla' }, { tagKey: 'tagVal' });
});

it('track with event key, userId undefined, attributes undefined, and event tags, calls inner client with valid arguments', () => {
const mockFn = mockInnerClient.track as jest.Mock;
instance.track('evt1', undefined, undefined, { tagKey: 'tagVal' });

expect(mockFn).toHaveBeenCalledTimes(1);
expect(mockFn).toHaveBeenCalledWith('evt1', 'user1', { foo: 'bar' }, { tagKey: 'tagVal' });
});
});
});