mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
test: test rule optimization (#2871)
This commit is contained in:
@@ -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 () => {
|
||||||
|
|||||||
+2
-2
@@ -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 () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user