Skip to content

Commit

Permalink
Add mixed char tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Loder committed Nov 1, 2023
1 parent ce00069 commit bbee094
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/syllable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe.each`
${"syllable with tsere-yod"} | ${"קָדְשֵׁ֧י"} | ${1} | ${"TSERE"} | ${true}
${"syllable with holam-vav"} | ${"בַּיּ֣וֹם"} | ${1} | ${"HOLAM"} | ${true}
${"syllable with hiriq-yod"} | ${"אָנֹֽכִי"} | ${2} | ${"HIRIQ"} | ${true}
${"syllable with mixed chars"} | ${"rˁִː֣"} | ${0} | ${"HIRIQ"} | ${true}
`("hasVowelName:", ({ description, hebrew, syllableNum, vowelName, result }) => {
const heb = new Text(hebrew);
const syllable = heb.syllables[syllableNum];
Expand Down Expand Up @@ -133,6 +134,7 @@ describe.each`
${"syllable with tsere-yod"} | ${"קָדְשֵׁ֧י"} | ${1} | ${"\u{05B5}"} | ${false}
${"syllable with holam-vav"} | ${"בַּיּ֣וֹם"} | ${1} | ${"\u{05B9}"} | ${false}
${"syllable with hiriq-yod"} | ${"אָנֹֽכִי"} | ${2} | ${"\u{05B4}"} | ${false}
${"syllable with mixed chars"} | ${"rˁִː֣"} | ${0} | ${"\u{05B4}"} | ${false}
`("vowel:", ({ description, hebrew, syllableNum, vowel, allowNoNiqqud }) => {
// normally don't use `allowNoNiqqud` in testing, but needed to get `null`
const heb = new Text(hebrew, { allowNoNiqqud });
Expand All @@ -155,6 +157,7 @@ describe.each`
${"syllable with tsere-yod"} | ${"קָדְשֵׁ֧י"} | ${1} | ${"TSERE"} | ${false}
${"syllable with holam-vav"} | ${"בַּיּ֣וֹם"} | ${1} | ${"HOLAM"} | ${false}
${"syllable with hiriq-yod"} | ${"אָנֹֽכִי"} | ${2} | ${"HIRIQ"} | ${false}
${"syllable with mixed chars"} | ${"rˁִː֣"} | ${0} | ${"HIRIQ"} | ${true}
`("vowelName:", ({ description, hebrew, syllableNum, vowelName, allowNoNiqqud }) => {
// normally don't use `allowNoNiqqud` in testing, but needed to get `null`
const heb = new Text(hebrew, { allowNoNiqqud });
Expand Down

0 comments on commit bbee094

Please sign in to comment.