import { createKeyboardEvent , createMouseEvent } from './event-object' ; /**
 * Karma Testing Utilities
 * The Angular CDK includes these in newer versions, but until we upgrade we must use our own
 */ export function dispatchEvent ( node , event ) { node . dispatchEvent ( event ) ; return event ; } export function dispatchKeyboardEvent ( node , type , keyCode , target ? , key ? ) { return dispatchEvent ( node , createKeyboardEvent ( type , keyCode , target , key ) ) as KeyboardEvent ; } export function dispatchMouseEvent ( node , type , x = 0 , y = 0 , event = createMouseEvent ( type , x , y ) ) { return dispatchEvent ( node , event ) as MouseEvent ; }