test: add date test case

This commit is contained in:
DIYgod
2020-02-01 18:21:39 +08:00
parent fbabb3679c
commit eec4fe626c
+4
View File
@@ -74,6 +74,10 @@ describe('date', () => {
expect(+new Date(parseDate('2月3日'))).toBe(+new Date('2019-2-3 00:00'));
});
it('M/D', async () => {
expect(+new Date(parseDate('2/3'))).toBe(+new Date('2019-2-3 00:00'));
});
it('Y-M-D', async () => {
expect(+new Date(parseDate('2018-4-2'))).toBe(+new Date('2018-4-2'));
});