feat: Add chatwoot:ready
event listener on window (#1091)
* feat: Add `chatwoot:ready` event listener on window * Add specs * Rename customEventHelper.js -> CustomEventHelper.js
This commit is contained in:
parent
80b083c7fc
commit
12ee7e5d82
5 changed files with 42 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
import { dispatchWindowEvent } from '../CustomEventHelper';
|
||||
|
||||
describe('dispatchWindowEvent', () => {
|
||||
it('dispatches correct event', () => {
|
||||
window.dispatchEvent = jest.fn();
|
||||
dispatchWindowEvent('chatwoot:ready');
|
||||
expect(dispatchEvent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue