Collapse consecutive bible-plan chapters into a citation range
Deploy / deploy (push) Successful in 1m51s
Deploy / deploy (push) Successful in 1m51s
Multi-chapter readings (e.g. Job 34-37, authored as one YAML entry per chapter) were rendering as "Job 34; Job 35; Job 36; Job 37" instead of the compact "Job 34-37". Verse-qualified and non-consecutive citations are unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGjUyhUZJaSjiniEmnLdak
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { getBiblePlanReadings } from '../../src/propers/bible-plan';
|
||||
|
||||
describe('getBiblePlanReadings citation labels', () => {
|
||||
const readings = getBiblePlanReadings('post-pentecost-14', 'thursday', '2026-09-17');
|
||||
|
||||
it('collapses a consecutive multi-chapter run of the same book into a range', () => {
|
||||
expect(readings[0]?.citation.la).toBe('Job 34-37');
|
||||
expect(readings[0]?.citation.en).toBe('Job 34-37');
|
||||
});
|
||||
|
||||
it('leaves a single-chapter reading unchanged', () => {
|
||||
expect(readings[1]?.citation.la).toBe('Sir 42');
|
||||
});
|
||||
|
||||
it('leaves a verse-qualified citation unchanged, never merged into a range', () => {
|
||||
expect(readings[2]?.citation.la).toBe('Luke 18:1-23');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user