export function typeTest ( inputValue , fixture ) { fixture . detectChanges ( ) ; fixture . nativeElement . querySelector ( 'input' ) . value = inputValue ; fixture . nativeElement . querySelector ( 'input' ) . dispatchEvent ( new Event ( 'input' ) ) ; fixture . detectChanges ( ) ; return fixture . nativeElement . querySelector ( 'input' ) . value ; } export function equal ( value , expectedValue , fixture , async = false ) { typeTest ( value , fixture ) ; if ( async ) { Promise . resolve ( ) . then ( ( ) => { expect ( fixture . nativeElement . querySelector ( 'input' ) . value ) . toBe ( expectedValue ) ; } ) ; return ; } expect ( fixture . nativeElement . querySelector ( 'input' ) . value ) . toBe ( expectedValue ) ; }