mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(parser-native): harden native parser test edge cases
This commit is contained in:
1 parent
c0548f63c8
commit
312a0306cb
5 files changed
+282
-55
No files matched your search
@@ -38,8 +38,8 @@ describe('parseTimeOptions', () => {
|
||||
})
|
||||
|
||||
it('accepts "YYYY-MM-DD HH:mm" and full ISO 8601', () => {
|
||||
const range = parseTimeOptions({ since: '2026-06-01 08:30', until: '2026-06-01T10:00:00+08:00' }, NOW)
|
||||
assert.equal(range.startTs, localEpoch(2026, 6, 1, 8, 30))
|
||||
const range = parseTimeOptions({ since: '2026-05-31 08:30', until: '2026-06-01T10:00:00+08:00' }, NOW)
|
||||
assert.equal(range.startTs, localEpoch(2026, 5, 31, 8, 30))
|
||||
assert.equal(range.endTs, Math.floor(new Date('2026-06-01T10:00:00+08:00').getTime() / 1000))
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user