test: test rule optimization (#2871)

This commit is contained in:
Cloud 2019-08-18 21:40:51 +08:00 committed by DIYgod
parent 6f2ee73073
commit cb408c94de
2 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ describe('index', () => {
title: 'RSSHub', title: 'RSSHub',
}; };
expect(configUtils.getProp(data, ['title'], $)).toBe('RSSHub'); expect(configUtils.getProp(data, ['title'], $)).toBe('RSSHub');
expect(configUtils.getProp(data, 'title', $)).toBe('RSSHub');
}); });
it('all', async () => { it('all', async () => {

View File

@ -82,8 +82,8 @@ describe('date', () => {
expect(+new Date(parseDate('4-2'))).toBe(+new Date('2019-4-2')); expect(+new Date(parseDate('4-2'))).toBe(+new Date('2019-4-2'));
}); });
it('M-D', async () => { it('H:m', async () => {
expect(+new Date(parseDate('4-2'))).toBe(+new Date('2019-4-2')); expect(+new Date(parseDate('4:2'))).toBe(+new Date('2019-1-1 04:02'));
}); });
it('刚刚', async () => { it('刚刚', async () => {