feat: Add chatwoot:error sdk event (#3998)

This commit is contained in:
Muhsin Keloth 2022-02-21 09:40:11 +05:30 committed by GitHub
parent 3b015d4dd8
commit 7ba24b90c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 29 deletions

View file

@ -3,7 +3,7 @@ import { dispatchWindowEvent } from '../CustomEventHelper';
describe('dispatchWindowEvent', () => {
it('dispatches correct event', () => {
window.dispatchEvent = jest.fn();
dispatchWindowEvent('chatwoot:ready');
dispatchWindowEvent({ eventName: 'chatwoot:ready' });
expect(dispatchEvent).toHaveBeenCalled();
});
});