mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10316] - Fix moment js deprecation warnings in core (#7831)
This commit is contained in:
@@ -102,8 +102,9 @@ describe('DateTimeWidgetComponent', () => {
|
||||
});
|
||||
|
||||
widget.field = field;
|
||||
const mockDate = moment('1982-03-13T10:00:000Z', 'YYYY-MM-DDTHH:mm:ssZ');
|
||||
widget.onDateChanged(mockDate);
|
||||
|
||||
widget.onDateChanged(moment('1982-03-13T10:00:000Z'));
|
||||
expect(widget.onFieldChanged).toHaveBeenCalledWith(field);
|
||||
});
|
||||
|
||||
|
@@ -92,10 +92,9 @@ describe('DateWidgetComponent', () => {
|
||||
type: 'date',
|
||||
readOnly: 'false'
|
||||
});
|
||||
|
||||
widget.field = field;
|
||||
widget.onDateChanged({ value: moment('12/12/2012', widget.field.dateDisplayFormat) });
|
||||
|
||||
widget.onDateChanged({ value: moment('12/12/2012') });
|
||||
expect(widget.onFieldChanged).toHaveBeenCalledWith(field);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user