Skip to content

Commit

Permalink
[FSSDK-8184] new case addition
Browse files Browse the repository at this point in the history
  • Loading branch information
junaed-optimizely committed Nov 6, 2024
1 parent e851deb commit 99c53b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
});
});
});

Expand Down

0 comments on commit 99c53b9

Please sign in to comment.