ngMocks.event
ngMocks.event
solves the legacy of IE11, when an event object cannot be created via new CustomEvent
, but via document.createEvent
.
Besides that, ngMocks.event
provides a simple interface to customize the event properties.
const event = ngMocks.event('click', {
x: 1,
y: 2,
});
The created event can be dispatched via ngMocks.trigger
.