Files
vu/tests/calendar/february-sanctoral.test.ts
T
will ce778d51e3
Deploy / deploy (push) Successful in 1m6s
Add 6 more February saints/feasts previously never added
Purification of the BVM (Feb 2), St. Andrew Corsini (Feb 4), St. John
of Matha (Feb 8), Apparition of the Immaculate BVM at Lourdes (Feb 11),
Ss. Seven Founders of the Servite Order (Feb 12), St. Gabriel of Our
Lady of Sorrows (Feb 27) -- all had real, complete Matins content in
the reference engine and no exclusion comment; simply never reached
during the earlier month-by-month sanctoral pulls. Continuing the same
sweep as January's St. Francis de Sales/St. Martina/St. John Bosco.

Test update (not a regression): St. Andrew Corsini transfers onto Feb 5
in years where Sexagesima falls on his own Feb 4, outranking St. Agatha
when it does -- february-sanctoral.test.ts's proof year for Agatha
moved from 2029 (now a collision year) to 2025 (clean).

npm test (365 tests) and tsc --noEmit both pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 15:26:00 -04:00

60 lines
2.8 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.
// 2029 was the original proof year, but St. Andrew Corsini (added
// 2026-08 -- see st-andrew-corsini.yml) transfers onto Feb 5 in years
// where Sexagesima falls on his own Feb 4, and outranks Agatha
// (Duplex vs. Semiduplex) when it does -- 2029 is now one of those
// years. 2025 has no such collision.
const day = resolveDay('2025-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');
});
});