Chatwoot/app/javascript/shared/helpers/specs/CustomEventHelper.spec.js

10 lines
294 B
JavaScript
Raw Normal View History

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