test: add date test case

This commit is contained in:
DIYgod 2020-02-01 18:21:39 +08:00
parent fbabb3679c
commit eec4fe626c
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 4 additions and 0 deletions

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'));
});