Skip to content

Commit d3099ee

Browse files
committed
Improve tests
1 parent 35545b0 commit d3099ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/helpers/dateUtils.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ test('formatDate does not reformat invalid date', () => {
1212
test('formatDateTime reformats date with a time if provided', () => {
1313
expect(formatDateTime('04/12/19')).toEqual('2019-04-12');
1414
expect(formatDateTime('2019-04-12T08:00:00')).toEqual('2019-04-12T08:00:00+00:00');
15-
expect(formatDateTime('2019-04-12T08:00:00+01:00')).toEqual('2019-04-12T07:00:00+00:00');
1615
});
1716

1817
test('formatDateTime respects timeZone information if provided', () => {
1918
const dateTimeWithZone = '2020-05-08T18:00:00+00:00';
2019
expect(formatDateTime(dateTimeWithZone)).toEqual('2020-05-08T18:00:00+00:00');
2120
const secondDate = '2020-05-08T18:00:00Z';
2221
expect(formatDateTime(secondDate)).toEqual('2020-05-08T18:00:00+00:00');
22+
const thirdDate = '2019-04-12T08:00:00+01:00';
23+
expect(formatDateTime(thirdDate)).toEqual('2019-04-12T07:00:00+00:00');
2324
});
2425

2526
test('formatDateTime does not reformat invalid date', () => {

0 commit comments

Comments
 (0)