v1.2.8 新增治水、分饼、耕田、得金、日禄;新增时辰LunarTime;新增获取当天的所有时辰。
This commit is contained in:
24
__tests__/LunarYear.test.js
Normal file
24
__tests__/LunarYear.test.js
Normal 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('十一牛耕田');
|
||||
});
|
||||
Reference in New Issue
Block a user