v1.2.1 修复1-99年日期错乱的问题;增加单元测试。
This commit is contained in:
13
__tests__/SolarSeason.test.js
Normal file
13
__tests__/SolarSeason.test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
var {SolarMonth} = require('../lunar');
|
||||
|
||||
test('toString()', () => {
|
||||
const month = SolarMonth.fromYm(2019, 5);
|
||||
expect(month.toString()).toBe('2019-5');
|
||||
expect(month.next(1).toString()).toBe('2019-6');
|
||||
});
|
||||
|
||||
test('toFullString()', () => {
|
||||
const month = SolarMonth.fromYm(2019, 5);
|
||||
expect(month.toFullString()).toBe('2019年5月');
|
||||
expect(month.next(1).toFullString()).toBe('2019年6月');
|
||||
});
|
||||
Reference in New Issue
Block a user