1
0
mirror of synced 2026-04-05 10:38:33 +08:00

v1.2.8 新增治水、分饼、耕田、得金、日禄;新增时辰LunarTime;新增获取当天的所有时辰。

This commit is contained in:
6tail
2021-10-13 22:19:45 +08:00
parent 7d305771a9
commit 632d218e09
5 changed files with 187 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
var {LunarYear} = require('../lunar');
test('test1', () => {
const year = LunarYear.fromYear(2017);
expect(year.getZhiShui()).toBe('二龙治水');
expect(year.getFenBing()).toBe('二人分饼');
});
test('test2', () => {
const year = LunarYear.fromYear(2018);
expect(year.getZhiShui()).toBe('二龙治水');
expect(year.getFenBing()).toBe('八人分饼');
});
test('test3', () => {
const year = LunarYear.fromYear(5);
expect(year.getZhiShui()).toBe('三龙治水');
expect(year.getFenBing()).toBe('一人分饼');
});
test('test4', () => {
const year = LunarYear.fromYear(2021);
expect(year.getGengTian()).toBe('十一牛耕田');
});