Chatwoot/app/javascript/shared/helpers/specs/DateHelper.sepc.js
Pranav Raj S cfc56705fd [Enhancement] Group widget messages by date (#363)
* [Enhancement] Group widget messages by date

* Update DateSeparator snapshot
2019-12-15 00:06:01 +05:30

13 lines
391 B
JavaScript

import DateSeparator from '../DateSeparator';
describe('#DateSeparator', () => {
it('should format correctly without dateFormat', () => {
expect(new DateSeparator(1576340626).format()).toEqual('Dec 14, 2019');
});
it('should format correctly without dateFormat', () => {
expect(new DateSeparator(1576340626).format('DD-MM-YYYY')).toEqual(
'14-12-2019'
);
});
});