Skip to content

Commit 9e96690

Browse files
authored
parseDate - verify null input is not breaking (#2440)
1 parent 7d29982 commit 9e96690

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/interface.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ describe('interface', () => {
88
expect(date).toBe(undefined);
99
});
1010

11+
it('should return undefined if date is null', () => {
12+
const date = parseDate(null);
13+
expect(date).toBe(undefined);
14+
});
15+
1116
it('should accept UTC timestamp as argument', () => {
1217
const date = parseDate(1479832134398);
1318
expect(date.getTime()).toEqual(1479832134398);

0 commit comments

Comments
 (0)