From 79d9d8bf5a6c036c5d9b37b90182fb4b53835cd8 Mon Sep 17 00:00:00 2001 From: SLaks Date: Sun, 13 Oct 2024 11:53:48 -0400 Subject: [PATCH] Calendar: Make generator tests produce easily-readable snapshots This makes it easier to verify that the snapshots are actually correct. I left one raw dump to verify the actual object. --- src/calendar-model/generator.test.ts | 67 +- src/calendar-model/generator.test.ts.md | 1066 ++++++--------------- src/calendar-model/generator.test.ts.snap | Bin 6335 -> 4561 bytes src/calendar-model/hebcal-conversions.ts | 14 +- src/calendar-model/test-utils.ts | 2 +- 5 files changed, 333 insertions(+), 816 deletions(-) diff --git a/src/calendar-model/generator.test.ts b/src/calendar-model/generator.test.ts index 52837fc0..acefbe26 100644 --- a/src/calendar-model/generator.test.ts +++ b/src/calendar-model/generator.test.ts @@ -1,8 +1,11 @@ import test from 'ava' import { UserSettings } from './user-settings.ts' import { LeiningGenerator } from './generator.ts' -import { HDate, months } from '@hebcal/core' -import { LeiningDate } from './model-types.ts' +import { HDate, Locale, months } from '@hebcal/core' +import { LeiningAliyah, LeiningDate } from './model-types.ts' +import hebrewNumeralFromInteger from '../hebrew-numeral.ts' +import { Ref } from '../ref.ts' +import { getBookName } from './hebcal-conversions.ts' const testSettings: UserSettings = { ashkenazi: true, @@ -26,43 +29,69 @@ for (let year = 5780; year < 5800; year++) { test('generates יום כיפור', (t) => { t.snapshot( - stripDate(generator.createLeiningDate(new HDate(10, months.TISHREI, 5784))) + dumpLeiningDate(new HDate(10, months.TISHREI, 5784)), + 'These tests verify the returned information, in easily readable format' ) }) test('generates שמחת תורה', (t) => { - t.snapshot( - stripDate(generator.createLeiningDate(new HDate(23, months.TISHREI, 5784))) - ) + t.snapshot(dumpLeiningDate(new HDate(23, months.TISHREI, 5784))) }) test('generates תענית אסתר', (t) => { - t.snapshot( - stripDate(generator.createLeiningDate(new HDate(13, months.ADAR_II, 5785))) - ) + t.snapshot(dumpLeiningDate(new HDate(13, months.ADAR_II, 5785))) }) test('generates פורים', (t) => { - t.snapshot( - stripDate(generator.createLeiningDate(new HDate(14, months.ADAR_II, 5784))) - ) + t.snapshot(dumpLeiningDate(new HDate(14, months.ADAR_II, 5784))) }) test('generates ערב תשעה באב', (t) => { - t.snapshot( - stripDate(generator.createLeiningDate(new HDate(8, months.AV, 5784))) - ) + t.snapshot(dumpLeiningDate(new HDate(8, months.AV, 5784))) }) test('generates תשעה באב', (t) => { - t.snapshot( - stripDate(generator.createLeiningDate(new HDate(9, months.AV, 5784))) - ) + t.snapshot(dumpLeiningDate(new HDate(9, months.AV, 5784))) }) test('generates שבת ראש חודש חנוכה', (t) => { + t.snapshot(dumpLeiningDate(new HDate(30, months.KISLEV, 5782))) +}) + +/** Prints the information in a `LeiningDate`, to be easily readable in the Markdown snapshot. */ +function dumpLeiningDate(date: HDate) { + const ld = generator.createLeiningDate(date) + if (!ld) return null + return { + date: ld.id, + title: ld.title, + leinings: ld.leinings.map((o) => ({ + isParsha: o.isParsha, + runs: o.runs.map((r) => ({ + id: r.id, + type: r.type, + scroll: r.scroll, + aliyot: r.aliyot.map( + // TODO(haftara): Render book name, once we have those + (a) => + `${a.index}: ${bookName(a)} ${dumpRef(a.start)} - ${dumpRef(a.end)}` + ), + })), + })), + } +} +function bookName(a: LeiningAliyah) { + return Locale.gettext(getBookName(a.start), 'he-x-nonikud') +} + +function dumpRef(ref: Ref) { + return `${hebrewNumeralFromInteger(ref.c)}:${hebrewNumeralFromInteger(ref.v)}` +} + +test('generates the full LeiningDate object for יום כיפור', (t) => { t.snapshot( - stripDate(generator.createLeiningDate(new HDate(30, months.KISLEV, 5782))) + stripDate(generator.createLeiningDate(new HDate(10, months.TISHREI, 5784))), + 'This test verified the full structure of the LeiningDate interface' ) }) diff --git a/src/calendar-model/generator.test.ts.md b/src/calendar-model/generator.test.ts.md index 08b53879..0a145d35 100644 --- a/src/calendar-model/generator.test.ts.md +++ b/src/calendar-model/generator.test.ts.md @@ -6,256 +6,65 @@ Generated by [AVA](https://avajs.dev). ## generates יום כיפור -> Snapshot 1 +> These tests verify the returned information, in easily readable format { - id: '2023-09-25', + date: '2023-09-25', leinings: [ { - date: [Circular], - id: 'שחרית', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 6, - }, - index: 1, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 1, - }, - }, - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 11, - }, - index: 2, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 7, - }, - }, - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 17, - }, - index: 3, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 12, - }, - }, - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 24, - }, - index: 4, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 18, - }, - }, - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 30, - }, - index: 5, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 25, - }, - }, - { - end: { - b: 3, - c: 16, - scroll: 'torah', - v: 34, - }, - index: 6, - start: { - b: 3, - c: 16, - scroll: 'torah', - v: 31, - }, - }, + '1: Leviticus טז:א - טז:ו', + '2: Leviticus טז:ז - טז:יא', + '3: Leviticus טז:יב - טז:יז', + '4: Leviticus טז:יח - טז:כד', + '5: Leviticus טז:כה - טז:ל', + '6: Leviticus טז:לא - טז:לד', ], id: '2023-09-25:shacharis,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, { aliyot: [ - { - end: { - b: 4, - c: 29, - scroll: 'torah', - v: 11, - }, - index: 'Maftir', - start: { - b: 4, - c: 29, - scroll: 'torah', - v: 7, - }, - }, + 'Maftir: Numbers כט:ז - כט:יא', ], id: '2023-09-25:shacharis,maftir', - leining: [Circular], scroll: 'torah', type: 'מפטיר', }, { aliyot: [ - { - end: { - b: 1, - c: 58, - scroll: 'esther', - v: 14, - }, - index: undefined, - start: { - b: 1, - c: 57, - scroll: 'esther', - v: 14, - }, - }, + 'undefined: ישעיהו נז:יד - נח:יד', ], id: '2023-09-25:shacharis,haftara', - leining: [Circular], - scroll: 'esther', + scroll: 'isaiah', type: 'הפטרה', }, ], }, { - date: [Circular], - id: 'מנחה', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 3, - c: 18, - scroll: 'torah', - v: 5, - }, - index: 1, - start: { - b: 3, - c: 18, - scroll: 'torah', - v: 1, - }, - }, - { - end: { - b: 3, - c: 18, - scroll: 'torah', - v: 21, - }, - index: 2, - start: { - b: 3, - c: 18, - scroll: 'torah', - v: 6, - }, - }, - { - end: { - b: 3, - c: 18, - scroll: 'torah', - v: 30, - }, - index: 'Maftir', - start: { - b: 3, - c: 18, - scroll: 'torah', - v: 22, - }, - }, + '1: Leviticus יח:א - יח:ה', + '2: Leviticus יח:ו - יח:כא', + 'Maftir: Leviticus יח:כב - יח:ל', ], id: '2023-09-25:mincha,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, { aliyot: [ - { - end: { - b: 1, - c: 4, - scroll: 'esther', - v: 11, - }, - index: undefined, - start: { - b: 1, - c: 1, - scroll: 'esther', - v: 1, - }, - }, - { - end: { - b: 1, - c: 7, - scroll: 'esther', - v: 20, - }, - index: undefined, - start: { - b: 1, - c: 7, - scroll: 'esther', - v: 18, - }, - }, + 'undefined: יונה א:א - ד:יא', + 'undefined: מיכה ז:יח - ז:כ', ], id: '2023-09-25:mincha,haftara', - leining: [Circular], - scroll: 'esther', + scroll: 'jonah', type: 'הפטרה', }, ], @@ -269,178 +78,46 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 { - id: '2023-10-08', + date: '2023-10-08', leinings: [ { - date: [Circular], - id: 'שחרית', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 5, - c: 33, - scroll: 'torah', - v: 7, - }, - index: 1, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 1, - }, - }, - { - end: { - b: 5, - c: 33, - scroll: 'torah', - v: 12, - }, - index: 2, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 8, - }, - }, - { - end: { - b: 5, - c: 33, - scroll: 'torah', - v: 17, - }, - index: 3, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 13, - }, - }, - { - end: { - b: 5, - c: 33, - scroll: 'torah', - v: 21, - }, - index: 4, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 18, - }, - }, - { - end: { - b: 5, - c: 33, - scroll: 'torah', - v: 26, - }, - index: 5, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 22, - }, - }, - { - end: { - b: 5, - c: 34, - scroll: 'torah', - v: 12, - }, - index: 6, - start: { - b: 5, - c: 33, - scroll: 'torah', - v: 27, - }, - }, + '1: Deuteronomy לג:א - לג:ז', + '2: Deuteronomy לג:ח - לג:יב', + '3: Deuteronomy לג:יג - לג:יז', + '4: Deuteronomy לג:יח - לג:כא', + '5: Deuteronomy לג:כב - לג:כו', + '6: Deuteronomy לג:כז - לד:יב', ], id: '2023-10-08:shacharis,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, { aliyot: [ - { - end: { - b: 1, - c: 2, - scroll: 'torah', - v: 3, - }, - index: 7, - start: { - b: 1, - c: 1, - scroll: 'torah', - v: 1, - }, - }, + '7: Genesis א:א - ב:ג', ], id: '2023-10-08:shacharis,last-aliyah', - leining: [Circular], scroll: 'torah', type: 'שביעי', - }, - { - aliyot: [ - { - end: { - b: 4, - c: 30, - scroll: 'torah', - v: 1, - }, - index: 'Maftir', - start: { - b: 4, - c: 29, - scroll: 'torah', - v: 35, - }, - }, + }, + { + aliyot: [ + 'Maftir: Numbers כט:לה - ל:א', ], id: '2023-10-08:shacharis,maftir', - leining: [Circular], scroll: 'torah', type: 'מפטיר', }, { aliyot: [ - { - end: { - b: 1, - c: 1, - scroll: 'esther', - v: 18, - }, - index: undefined, - start: { - b: 1, - c: 1, - scroll: 'esther', - v: 1, - }, - }, + 'undefined: יהושוע א:א - א:יח', ], id: '2023-10-08:shacharis,haftara', - leining: [Circular], - scroll: 'esther', + scroll: 'joshua', type: 'הפטרה', }, ], @@ -454,184 +131,60 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 { - id: '2025-03-13', + date: '2025-03-13', leinings: [ { - date: [Circular], - id: 'שחרית', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 2, - c: 32, - scroll: 'torah', - v: 14, - }, - index: 1, - start: { - b: 2, - c: 32, - scroll: 'torah', - v: 11, - }, - }, - { - end: { - b: 2, - c: 34, - scroll: 'torah', - v: 3, - }, - index: 2, - start: { - b: 2, - c: 34, - scroll: 'torah', - v: 1, - }, - }, - { - end: { - b: 2, - c: 34, - scroll: 'torah', - v: 10, - }, - index: 3, - start: { - b: 2, - c: 34, - scroll: 'torah', - v: 4, - }, - }, + '1: Exodus לב:יא - לב:יד', + '2: Exodus לד:א - לד:ג', + '3: Exodus לד:ד - לד:י', ], id: '2025-03-13:shacharis,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, ], }, { - date: [Circular], - id: 'מנחה', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 2, - c: 32, - scroll: 'torah', - v: 14, - }, - index: 1, - start: { - b: 2, - c: 32, - scroll: 'torah', - v: 11, - }, - }, - { - end: { - b: 2, - c: 34, - scroll: 'torah', - v: 3, - }, - index: 2, - start: { - b: 2, - c: 34, - scroll: 'torah', - v: 1, - }, - }, - { - end: { - b: 2, - c: 34, - scroll: 'torah', - v: 10, - }, - index: 'Maftir', - start: { - b: 2, - c: 34, - scroll: 'torah', - v: 4, - }, - }, + '1: Exodus לב:יא - לב:יד', + '2: Exodus לד:א - לד:ג', + 'Maftir: Exodus לד:ד - לד:י', ], id: '2025-03-13:mincha,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, { aliyot: [ - { - end: { - b: 1, - c: 56, - scroll: 'esther', - v: 8, - }, - index: undefined, - start: { - b: 1, - c: 55, - scroll: 'esther', - v: 6, - }, - }, + 'undefined: ישעיהו נה:ו - נו:ח', ], id: '2025-03-13:mincha,haftara', - leining: [Circular], - scroll: 'esther', + scroll: 'isaiah', type: 'הפטרה', }, ], }, { - date: [Circular], - id: 'מגילה', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 1, - c: 10, - scroll: 'esther', - v: 3, - }, - index: undefined, - start: { - b: 1, - c: 1, - scroll: 'esther', - v: 1, - }, - }, + 'undefined: אסתר א:א - י:ג', ], id: '2025-03-13:megillah,megillah', - leining: [Circular], scroll: 'esther', type: 'מגילה', }, ], }, { - date: [Circular], - id: 'מעריב', isParsha: false, runs: [], }, @@ -644,93 +197,31 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 { - id: '2024-03-24', + date: '2024-03-24', leinings: [ { - date: [Circular], - id: 'מגילה', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 1, - c: 10, - scroll: 'esther', - v: 3, - }, - index: undefined, - start: { - b: 1, - c: 1, - scroll: 'esther', - v: 1, - }, - }, + 'undefined: אסתר א:א - י:ג', ], id: '2024-03-24:megillah,megillah', - leining: [Circular], scroll: 'esther', type: 'מגילה', }, ], }, { - date: [Circular], - id: 'שחרית', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 2, - c: 17, - scroll: 'torah', - v: 10, - }, - index: 1, - start: { - b: 2, - c: 17, - scroll: 'torah', - v: 8, - }, - }, - { - end: { - b: 2, - c: 17, - scroll: 'torah', - v: 13, - }, - index: 2, - start: { - b: 2, - c: 17, - scroll: 'torah', - v: 11, - }, - }, - { - end: { - b: 2, - c: 17, - scroll: 'torah', - v: 16, - }, - index: 3, - start: { - b: 2, - c: 17, - scroll: 'torah', - v: 14, - }, - }, + '1: Exodus יז:ח - יז:י', + '2: Exodus יז:יא - יז:יג', + '3: Exodus יז:יד - יז:טז', ], id: '2024-03-24:shacharis,main', - leining: [Circular], scroll: 'torah', type: 'Main', }, @@ -745,54 +236,145 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 { - id: '2024-08-12', + date: '2024-08-12', leinings: [ { - date: [Circular], - id: 'מגילה', isParsha: false, runs: [ { aliyot: [ - { - end: { - b: 1, - c: 5, - scroll: 'esther', - v: 22, - }, - index: undefined, - start: { - b: 1, - c: 1, - scroll: 'esther', - v: 1, - }, - }, + 'undefined: איכה א:א - ה:כב', + ], + id: '2024-08-12:megillah,megillah', + scroll: 'lamentations', + type: 'מגילה', + }, + ], + }, + { + isParsha: false, + runs: [], + }, + ], + title: 'ערב תשעה באב', + } + +## generates תשעה באב + +> Snapshot 1 + + { + date: '2024-08-13', + leinings: [ + { + isParsha: false, + runs: [ + { + aliyot: [ + '1: Deuteronomy ד:כה - ד:כט', + '2: Deuteronomy ד:ל - ד:לה', + '3: Deuteronomy ד:לו - ד:מ', + ], + id: '2024-08-13:shacharis,main', + scroll: 'torah', + type: 'Main', + }, + { + aliyot: [ + 'undefined: ירמיהו ח:יג - ט:כג', + ], + id: '2024-08-13:shacharis,haftara', + scroll: 'jeremiah', + type: 'הפטרה', + }, + ], + }, + { + isParsha: false, + runs: [ + { + aliyot: [ + '1: Exodus לב:יא - לב:יד', + '2: Exodus לד:א - לד:ג', + 'Maftir: Exodus לד:ד - לד:י', + ], + id: '2024-08-13:mincha,main', + scroll: 'torah', + type: 'Main', + }, + { + aliyot: [ + 'undefined: ישעיהו נה:ו - נו:ח', + ], + id: '2024-08-13:mincha,haftara', + scroll: 'isaiah', + type: 'הפטרה', + }, + ], + }, + ], + title: 'תשעה באב', + } + +## generates שבת ראש חודש חנוכה + +> Snapshot 1 + + { + date: '2021-12-04', + leinings: [ + { + isParsha: true, + runs: [ + { + aliyot: [ + '1: Genesis מא:א - מא:יד', + '2: Genesis מא:טו - מא:לח', + '3: Genesis מא:לט - מא:נב', + '4: Genesis מא:נג - מב:יח', + '5: Genesis מב:יט - מג:טו', + '6: Genesis מג:טז - מד:יז', + ], + id: '2021-12-04:shacharis,main', + scroll: 'torah', + type: 'Main', + }, + { + aliyot: [ + '7: Numbers כח:ט - כח:טו', + ], + id: '2021-12-04:shacharis,last-aliyah', + scroll: 'torah', + type: 'שביעי', + }, + { + aliyot: [ + 'Maftir: Numbers ז:מב - ז:מז', + ], + id: '2021-12-04:shacharis,maftir', + scroll: 'torah', + type: 'מפטיר', + }, + { + aliyot: [ + 'undefined: זכריה ב:יד - ד:ז', ], - id: '2024-08-12:megillah,megillah', - leining: [Circular], - scroll: 'esther', - type: 'מגילה', + id: '2021-12-04:shacharis,haftara', + scroll: 'zechariah', + type: 'הפטרה', }, ], }, - { - date: [Circular], - id: 'מעריב', - isParsha: false, - runs: [], - }, ], - title: 'ערב תשעה באב', + title: 'פרשת מקץ', } -## generates תשעה באב +## generates the full LeiningDate object for יום כיפור -> Snapshot 1 +> This test verified the full structure of the LeiningDate interface { - id: '2024-08-13', + id: '2023-09-25', leinings: [ { date: [Circular], @@ -803,273 +385,202 @@ Generated by [AVA](https://avajs.dev). aliyot: [ { end: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 29, + v: 6, }, index: 1, start: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 25, + v: 1, }, }, { end: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 35, + v: 11, }, index: 2, start: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 30, + v: 7, }, }, { end: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 40, + v: 17, }, index: 3, start: { - b: 5, - c: 4, + b: 3, + c: 16, scroll: 'torah', - v: 36, + v: 12, }, }, - ], - id: '2024-08-13:shacharis,main', - leining: [Circular], - scroll: 'torah', - type: 'Main', - }, - { - aliyot: [ { end: { - b: 1, - c: 9, - scroll: 'esther', - v: 23, + b: 3, + c: 16, + scroll: 'torah', + v: 24, }, - index: undefined, + index: 4, start: { - b: 1, - c: 8, - scroll: 'esther', - v: 13, + b: 3, + c: 16, + scroll: 'torah', + v: 18, }, }, - ], - id: '2024-08-13:shacharis,haftara', - leining: [Circular], - scroll: 'esther', - type: 'הפטרה', - }, - ], - }, - { - date: [Circular], - id: 'מנחה', - isParsha: false, - runs: [ - { - aliyot: [ { end: { - b: 2, - c: 32, + b: 3, + c: 16, scroll: 'torah', - v: 14, + v: 30, }, - index: 1, + index: 5, start: { - b: 2, - c: 32, + b: 3, + c: 16, scroll: 'torah', - v: 11, + v: 25, }, }, { end: { - b: 2, - c: 34, + b: 3, + c: 16, scroll: 'torah', - v: 3, + v: 34, }, - index: 2, + index: 6, start: { - b: 2, - c: 34, + b: 3, + c: 16, scroll: 'torah', - v: 1, + v: 31, }, }, + ], + id: '2023-09-25:shacharis,main', + leining: [Circular], + scroll: 'torah', + type: 'Main', + }, + { + aliyot: [ { end: { - b: 2, - c: 34, + b: 4, + c: 29, scroll: 'torah', - v: 10, + v: 11, }, index: 'Maftir', start: { - b: 2, - c: 34, + b: 4, + c: 29, scroll: 'torah', - v: 4, + v: 7, }, }, ], - id: '2024-08-13:mincha,main', + id: '2023-09-25:shacharis,maftir', leining: [Circular], scroll: 'torah', - type: 'Main', + type: 'מפטיר', }, { aliyot: [ { end: { b: 1, - c: 56, - scroll: 'esther', - v: 8, + c: 58, + scroll: 'isaiah', + v: 14, }, index: undefined, start: { b: 1, - c: 55, - scroll: 'esther', - v: 6, + c: 57, + scroll: 'isaiah', + v: 14, }, }, ], - id: '2024-08-13:mincha,haftara', + id: '2023-09-25:shacharis,haftara', leining: [Circular], - scroll: 'esther', + scroll: 'isaiah', type: 'הפטרה', }, ], }, - ], - title: 'תשעה באב', - } - -## generates שבת ראש חודש חנוכה - -> Snapshot 1 - - { - id: '2021-12-04', - leinings: [ { date: [Circular], - id: 'שחרית', - isParsha: true, + id: 'מנחה', + isParsha: false, runs: [ { aliyot: [ { end: { - b: 1, - c: 41, + b: 3, + c: 18, scroll: 'torah', - v: 14, + v: 5, }, index: 1, start: { - b: 1, - c: 41, + b: 3, + c: 18, scroll: 'torah', v: 1, }, }, { end: { - b: 1, - c: 41, + b: 3, + c: 18, scroll: 'torah', - v: 38, + v: 21, }, index: 2, start: { - b: 1, - c: 41, - scroll: 'torah', - v: 15, - }, - }, - { - end: { - b: 1, - c: 41, - scroll: 'torah', - v: 52, - }, - index: 3, - start: { - b: 1, - c: 41, - scroll: 'torah', - v: 39, - }, - }, - { - end: { - b: 1, - c: 42, - scroll: 'torah', - v: 18, - }, - index: 4, - start: { - b: 1, - c: 41, - scroll: 'torah', - v: 53, - }, - }, - { - end: { - b: 1, - c: 43, - scroll: 'torah', - v: 15, - }, - index: 5, - start: { - b: 1, - c: 42, + b: 3, + c: 18, scroll: 'torah', - v: 19, + v: 6, }, }, { end: { - b: 1, - c: 44, + b: 3, + c: 18, scroll: 'torah', - v: 17, + v: 30, }, - index: 6, + index: 'Maftir', start: { - b: 1, - c: 43, + b: 3, + c: 18, scroll: 'torah', - v: 16, + v: 22, }, }, ], - id: '2021-12-04:shacharis,main', + id: '2023-09-25:mincha,main', leining: [Circular], scroll: 'torah', type: 'Main', @@ -1078,73 +589,42 @@ Generated by [AVA](https://avajs.dev). aliyot: [ { end: { - b: 4, - c: 28, - scroll: 'torah', - v: 15, - }, - index: 7, - start: { - b: 4, - c: 28, - scroll: 'torah', - v: 9, - }, - }, - ], - id: '2021-12-04:shacharis,last-aliyah', - leining: [Circular], - scroll: 'torah', - type: 'שביעי', - }, - { - aliyot: [ - { - end: { - b: 4, - c: 7, - scroll: 'torah', - v: 47, + b: 1, + c: 4, + scroll: 'jonah', + v: 11, }, - index: 'Maftir', + index: undefined, start: { - b: 4, - c: 7, - scroll: 'torah', - v: 42, + b: 1, + c: 1, + scroll: 'jonah', + v: 1, }, }, - ], - id: '2021-12-04:shacharis,maftir', - leining: [Circular], - scroll: 'torah', - type: 'מפטיר', - }, - { - aliyot: [ { end: { b: 1, - c: 4, - scroll: 'esther', - v: 7, + c: 7, + scroll: 'micah', + v: 20, }, index: undefined, start: { b: 1, - c: 2, - scroll: 'esther', - v: 14, + c: 7, + scroll: 'micah', + v: 18, }, }, ], - id: '2021-12-04:shacharis,haftara', + id: '2023-09-25:mincha,haftara', leining: [Circular], - scroll: 'esther', + scroll: 'jonah', type: 'הפטרה', }, ], }, ], - title: 'פרשת מקץ', + title: 'יום כפור', } diff --git a/src/calendar-model/generator.test.ts.snap b/src/calendar-model/generator.test.ts.snap index 6fcf4a7a524272607c23dc1573caa0180bdbce53..08daf16d66202cdc6a71f6b936ad20a13b621fc6 100644 GIT binary patch literal 4561 zcmV;?5iagQRzVxQTzqibcc3IZGKEUi2SdteIw4~Gq8Zek83FMHI zjHMA8B9F+-h}eWepsa1$TGnR8iZI3m*>G5TFqE3~6dD>rsA*F;k6=#NOIaJ*CbV#9 z>i1^m&FJ?=vze({|MeTc`~BVfe#^bz-~HXEI|nun4flOBa@(#zG#DKUY;L(C5DJ9- z(Lls7r_BlT2Zp)BoHlox6Xskn67pXa861vAZrIh|?~nQ~EBQ#pi}g?Vgti(u9q0r8 z5LhZaON8fwjaLTxqCz;$>gsAl1wutsu~aCvR!d(Zw0?gykoZyBy`sCPbH%Bh-K!9l zLhJ<+&wN9HU?>>6A|iF5+pm!LRh6{gw%#&P{U_iThfI7UVV?eb;jn*;P!g@GswzY& zLP3-X@nP)U%7kbVAcWn=S^-}a5ERlYs`FpbC)Dc&+$>N4-F;v z%y8I0DDTARmaCk7q^-9*am*Uc$E=nG%o>OW!-s2FsX1%zHn*G8*4}o^dn6z8TGN_0 z=pTss!~V?nd4dstFq?tnwt;izc#44s^D(eK#lTI$P~V`xD0Axb7P!>nHsv&8`jx|> zJO<1syj@;c@7p{~Y?kQEL-Kq>@de2 z%uE8IJ6cw|5i==oKVxYrwL`=FK|5-_?MHfz^G7yq41^8qX?x;QCf%CKz>t4qU}*DM zmkb6X0V5iSL?g!4fpBnOixC|R7~w#4BpeF#8^O@PaCnnH8XOKSH-aG};Ex1{wiw}n zzu&)cC}6~%rlXyE%vp2F+-sP7E!t*|r_jzjW3Dt`(gtPO%;1eRSDDAH?*H&e?6)ClOx!ZdT`fM=)UfcjL~-#J7Y#}xR90`DnV>0G%AH7cB-LO_MvWd`V`a}TQU zhzbW(&@?zsW`J%wcYy|9(qL1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