Skip to content

Commit ba1e775

Browse files
committed
refactor(DateUtils.test.js): add given/when/then
1 parent 087e9ba commit ba1e775

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/frontend/src/utils/DateUtils.test.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ import './DateUtils.js'
33
describe('DateUtils.formatDateToDdMmYyyy()', () => {
44

55
it('should return a string in a format dd.mm.yyyy', () => {
6+
// given
67
const date = new Date('2018-06-12T16:59:54.451Z');
7-
expect(DateUtils.formatDateToDdMmYyyy(date)).toBe('12.06.2018');
8+
// when
9+
const result = DateUtils.formatDateToDdMmYyyy(date);
10+
// then
11+
expect(result).toBe('12.06.2018');
812
});
913

1014
});

0 commit comments

Comments
 (0)