Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c024e203a8 |
@@ -1,4 +1,4 @@
|
|||||||
var {HolidayUtil} = require('../lunar');
|
const {HolidayUtil} = require('../lunar');
|
||||||
|
|
||||||
test('test1', () => {
|
test('test1', () => {
|
||||||
expect(HolidayUtil.getHoliday('2020-01-01') + '').toBe('2020-01-01 元旦节 2020-01-01');
|
expect(HolidayUtil.getHoliday('2020-01-01') + '').toBe('2020-01-01 元旦节 2020-01-01');
|
||||||
@@ -42,3 +42,12 @@ test('test1', () => {
|
|||||||
test('test2', () => {
|
test('test2', () => {
|
||||||
expect(HolidayUtil.getHoliday('2016-10-04').getTarget()).toBe('2016-10-01');
|
expect(HolidayUtil.getHoliday('2016-10-04').getTarget()).toBe('2016-10-01');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('testRemove', () => {
|
||||||
|
let holiday = HolidayUtil.getHoliday('2010-01-01');
|
||||||
|
expect(holiday.getName()).toBe('元旦');
|
||||||
|
|
||||||
|
HolidayUtil.fix('20100101~000000000000000000000000000');
|
||||||
|
holiday = HolidayUtil.getHoliday('2010-01-01');
|
||||||
|
expect(holiday).toBe(null);
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lunar-javascript",
|
"name": "lunar-javascript",
|
||||||
"version": "1.2.31",
|
"version": "1.2.32",
|
||||||
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
|
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user