Skip to content

Commit

Permalink
Update formatDate test
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Jun 27, 2022
1 parent acdd9a2 commit 94598f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/date/src/test/formatDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ describe('date/formatDate', () => {
resetSettings();
});

it('should return 2020-05-02 with no formatting options', () => {
// Uses DEFAULT_DATE_SETTINGS.dateFormat
it('should return May 2, 2020 with no formatting options', () => {
const dateString = '2020-05-02T10:47:26';
const formattedDate = formatDate(dateString);

expect(formattedDate).toBe('2020-05-02');
expect(formattedDate).toBe('May 2, 2020');
});

it('should return "May 2, 2020" with "F j, Y" formatting options', () => {
Expand Down

0 comments on commit 94598f6

Please sign in to comment.