feat: add configurable timeline range

This commit is contained in:
2026-08-14 15:40:54 +02:00
parent b284275e98
commit 45c7c6a292
15 changed files with 121 additions and 14 deletions
+8
View File
@@ -90,6 +90,14 @@ describe('timeline projection', () => {
expect(timelinePositionPercent('2022-07-02', range)).toBeGreaterThan(49)
expect(timelinePositionPercent('2022-07-02', range)).toBeLessThan(51)
})
it('uses a valid configured date range without automatic year padding', () => {
const range = timelineRange(['1987-01-08', '1987-10-24'], 2026, { start: '1987-10-01', end: '1987-10-31' })
expect(new Date(range.start).toISOString()).toBe('1987-10-01T00:00:00.000Z')
expect(new Date(range.end).toISOString()).toBe('1987-10-31T23:59:59.999Z')
expect(timelinePositionPercent('1987-10-16', range)).toBeGreaterThan(48)
expect(timelinePositionPercent('1987-10-16', range)).toBeLessThan(52)
})
})
describe('folder domain behavior', () => {