From b99c98ca2e245687a43409a37eb34891e5267eb6 Mon Sep 17 00:00:00 2001 From: Charles Loder Date: Fri, 29 Dec 2023 20:57:10 -0500 Subject: [PATCH] Add tests for isInConstruct --- test/word.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/word.test.ts b/test/word.test.ts index 3193b7c..9dca87e 100644 --- a/test/word.test.ts +++ b/test/word.test.ts @@ -50,3 +50,14 @@ describe.each` }); }); }); + +describe.each` + description | heb | isInConstructArray + ${"with maqqef"} | ${"בֶּן־אָדָ֕ם"} | ${[true, false]} + ${"now maqqef"} | ${"בֶּן אָדָ֕ם"} | ${[false, false]} +`("isInConstruct:", ({ description, heb, isInConstructArray }) => { + const text = new Text(heb); + test(`${description}`, () => { + expect(text.words.map((word) => word.isInConstruct)).toEqual(isInConstructArray); + }); +});