Skip to content

Commit

Permalink
chore(session replay): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jxiwang committed Oct 29, 2024
1 parent af5bab3 commit fd8d3c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/session-replay-browser/test/hooks/click.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ describe('click', () => {
});
expect(jest.spyOn(mockEventsManager, 'addEvent')).not.toHaveBeenCalled();
});
test('do nothing if x/y is undefined', () => {
hook({
id: 1234,
type: MouseInteractions.Click,
x: undefined,
y: undefined,
});
expect(jest.spyOn(mockEventsManager, 'addEvent')).not.toHaveBeenCalled();
});
test('do nothing if no window given', () => {
mockGlobalScope(undefined);
const hook = clickHook({
Expand Down

0 comments on commit fd8d3c7

Please sign in to comment.