@@ -44,7 +44,7 @@ describe('IgxDateTimeEditor', () => {
44
44
dateTimeEditor . clear ( ) ;
45
45
expect ( dateTimeEditor . value ) . toBeNull ( ) ;
46
46
expect ( dateTimeEditor . valueChange . emit ) . toHaveBeenCalledTimes ( 1 ) ;
47
- expect ( dateTimeEditor . valueChange . emit ) . toHaveBeenCalledWith ( { oldValue : date , newValue : null , userInput : inputDate } ) ;
47
+ expect ( dateTimeEditor . valueChange . emit ) . toHaveBeenCalledWith ( null ) ;
48
48
} ) ;
49
49
50
50
it ( 'should update mask according to the input format' , ( ) => {
@@ -632,7 +632,7 @@ describe('IgxDateTimeEditor', () => {
632
632
date . setMonth ( 3 ) ;
633
633
const resultDate =
634
634
date . toLocaleString ( 'en-GB' , { weekday : 'long' , day : 'numeric' , month : 'long' , year : 'numeric' } )
635
- . replace ( / , / g, '' ) ;
635
+ . replace ( / , / g, '' ) ;
636
636
result = `${ resultDate } ${ formatShortTime ( date ) } ` ;
637
637
expect ( inputElement . nativeElement . value ) . toEqual ( result ) ;
638
638
} ) ) ;
@@ -695,7 +695,7 @@ describe('IgxDateTimeEditor', () => {
695
695
} ) ;
696
696
it ( 'should revert to empty mask on clear()' , fakeAsync ( ( ) => {
697
697
const date = new Date ( 2003 , 4 , 5 ) ;
698
- fixture . componentInstance . date = new Date ( 2003 , 3 , 5 ) ;
698
+ fixture . componentInstance . date = new Date ( 2003 , 3 , 5 ) ;
699
699
fixture . detectChanges ( ) ;
700
700
tick ( ) ;
701
701
const result = formatFullDateTime ( date ) ;
@@ -706,7 +706,7 @@ describe('IgxDateTimeEditor', () => {
706
706
} ) ) ;
707
707
it ( 'should move the caret to the start/end of the portion with CTRL + arrow left/right keys.' , fakeAsync ( ( ) => {
708
708
const date = new Date ( 2003 , 4 , 5 ) ;
709
- fixture . componentInstance . date = new Date ( 2003 , 3 , 5 ) ;
709
+ fixture . componentInstance . date = new Date ( 2003 , 3 , 5 ) ;
710
710
fixture . detectChanges ( ) ;
711
711
tick ( ) ;
712
712
const result = formatFullDateTime ( date ) ;
@@ -833,10 +833,9 @@ describe('IgxDateTimeEditor', () => {
833
833
834
834
const year = ( newDate . getFullYear ( ) . toString ( ) ) . slice ( - 2 ) ;
835
835
const result = [ newDate . getDate ( ) , newDate . getMonth ( ) + 1 , year ] . join ( '/' ) ;
836
- const args = { oldValue : undefined , newValue : newDate , userInput : result } ;
837
836
expect ( inputElement . nativeElement . value ) . toEqual ( result ) ;
838
837
expect ( dateTimeEditorDirective . valueChange . emit ) . toHaveBeenCalledTimes ( 1 ) ;
839
- expect ( dateTimeEditorDirective . valueChange . emit ) . toHaveBeenCalledWith ( args ) ;
838
+ expect ( dateTimeEditorDirective . valueChange . emit ) . toHaveBeenCalledWith ( newDate ) ;
840
839
} ) ;
841
840
it ( 'should fire validationFailed when input date is outside date range.' , ( ) => {
842
841
fixture . componentInstance . dateTimeFormat = 'dd-MM-yyyy' ;
0 commit comments