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

10 lines
279 B
JavaScript
Raw Normal View History

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