Files
vu/tests/calendar/february-sanctoral.test.ts
T
will 130b0f983d
Deploy / deploy (push) Successful in 56s
Extend the source-file fallback to Frances of Rome/Bibiana, fix a real Agatha/Lucy gap
Follow-up to the previous commit: applies the same "read the fileref
directly, no live query required" fix to St. Frances of Rome and St.
Bibiana, whose own filerefs simply hadn't been derived yet (they predate
the Kalendaria-table work this session built). Both resolve to
common-of-a-virgin, same as several of the 15 fixed previously.

Also swept every saint on the calendar (not just this batch's own
lineage) for any other still-missing collect or Benedictus antiphon,
which turned up a real, older gap: St. Agatha and St. Lucy's own file
comments already documented "resolves honestly missing... despite
propers being set" -- written before collectCommon existed as a
mechanism at all. Agatha's own [Oratio] is a name-substituted reference
confirmed identical to the already-existing collect-c6.yml template, so
collectCommon was simply wired in. Lucy's own [Oratio] references a
different Common formula unedited, with her own [Name] section supplying
the whole descriptive phrase a plain name field would otherwise need the
template for -- written as her own st-lucy-collect.yml rather than a new
single-use template, since she's the only current user of that unedited
form.

St. Clare showed up in the same sweep but is a false positive: her real
content lives in a separate commemoration-bundle file, used via a
different code path the sweep's synthetic-winner methodology doesn't
exercise -- already fully authored, no gap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 10:56:10 -04:00

55 lines
2.5 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { resolveDay } from '../../src/calendar';
import { getDayCollect } from '../../src/hours/resolve-common';
// Clean per-annum years for these dates (no Sunday collision, and for
// Feb 14/Feb 15 specifically, clear of the movable Ash-Wednesday-adjacent
// ferias too) — see data/calendar/saints/*.yml for per-saint source detail.
describe('February sanctoral pull (first pass)', () => {
it('a saint with a proper collect but no proper antiphon wins outright, antiphon missing', () => {
const day = resolveDay('2029-02-06'); // St. Dorothea
expect(day.winner).toEqual({
kind: 'sanctoral',
id: 'st-dorothea',
name: 'St. Dorothea, Virgin and Martyr',
rank: 'simplex',
});
expect(getDayCollect(day).status.en).toBe('verified');
});
it('a saint with a proper antiphon but no proper collect resolves the collect via its Common category (collectCommon), not missing', () => {
// Her own [Oratio] is @Commune/C6::s/N\./Agathæ/ -- a name-substituted
// reference, not unique text -- confirmed identical to collect-c6.yml's
// own template; wired via collectCommon (2026-08), postdating this
// saint's own original authoring, which is why this used to be missing.
const day = resolveDay('2029-02-05'); // St. Agatha
expect(day.winner).toEqual({
kind: 'sanctoral',
id: 'st-agatha',
name: 'St. Agatha, Virgin and Martyr',
rank: 'semiduplex',
});
const collect = getDayCollect(day);
expect(collect.status.en).toBe('verified');
expect(collect.text.en).toContain('Agatha');
});
it('the two Chair-of-Peter feasts (Rome, Antioch) are separate records with independently authored, matching content', () => {
const rome = resolveDay('2029-01-18');
const antioch = resolveDay('2029-02-22');
expect(rome.winner.kind).toBe('sanctoral');
expect(antioch.winner.kind).toBe('sanctoral');
if (rome.winner.kind === 'sanctoral' && antioch.winner.kind === 'sanctoral') {
expect(rome.winner.id).not.toBe(antioch.winner.id);
}
expect(getDayCollect(rome).text.en).toEqual(getDayCollect(antioch).text.en);
});
it('a vigil impeded by a privileged Lenten feria is not forced to win', () => {
// The Vigil of St. Matthias (Feb 23) lands on the Ember Friday of
// Lent's first week in 2029 — a privileged feria the vigil can't beat.
const day = resolveDay('2029-02-23');
expect(day.winner.kind).toBe('temporal');
});
});