Skip to content

Commit

Permalink
test: format n
Browse files Browse the repository at this point in the history
  • Loading branch information
waterbeside committed Dec 8, 2023
1 parent 5848a14 commit bef8014
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions __tests__/utils/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ describe('test format', () => {
expect(format('d, dRr', new Lunisolar('2023-12-31'))).toBe('0, 1')
expect(format('d, dRr', new Lunisolar('2023-12-22'))).toBe('5, 2')
})

it('char8 format n', () => {
expect(format('cY-cM-cD', new Lunisolar('2023-12-8'))).toBe('癸卯-甲子-庚子')
expect(format('cYn-cMn-cDn', new Lunisolar('2023-12-8'))).toBe('39-0-36')
expect(format('cYsn-cYbn cMsn-cMbn cDsn-cDbn', new Lunisolar('2023-12-8'))).toBe('9-3 0-0 6-0')
})
})

0 comments on commit bef8014

Please sign in to comment.