Skip to content

Commit 9d32a28

Browse files
committed
chore: more test cases
1 parent 7d17ce2 commit 9d32a28

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/i18n/surah.tr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const surahNamesTr: (SurahName | [])[] = [
1515
["Yusuf", "Peygamber Yusuf"],
1616
["Rad", "Gök gürültüsü"],
1717
["İbrahim", "Peygamber İbrahim"],
18-
["Hicr", "Medine’nin kuzeyinde vaktiyle Semûd kavminin yaşadığı bir yerin adıdır."],
18+
["Hicr", "Taşlı sahe"],
1919
["Nahl", "Bal arısı"],
2020
["İsra", "Geceleyin yürütmek"],
2121
["Kehf", "Mağara"],
@@ -74,7 +74,7 @@ export const surahNamesTr: (SurahName | [])[] = [
7474
["Nuh", "Peygamber Nuh"],
7575
["Cin", "Cin"],
7676
["Müzzemmil", "Örtünüp bürünen"],
77-
["Müddessir", "Örtünüp bürünen"],
77+
["Müddessir", "Bürünüp sarınan"],
7878
["Kıyame", "Kıyamet"],
7979
["İnsan", "İnsan"],
8080
["Mürselat", "Gönderilenler"],

tests/surahNames.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {
2+
meta,
3+
surahNamesAz,
4+
surahNamesEn,
5+
surahNamesRu,
6+
surahNamesTr
7+
} from "../src"
8+
9+
const languages = {
10+
en: surahNamesEn,
11+
ru: surahNamesRu,
12+
az: surahNamesAz,
13+
tr: surahNamesTr
14+
}
15+
16+
describe("getAyahCountInSurah", () => {
17+
it("should return correct ayah count for first surah", () => {
18+
Object.values(languages).forEach((language) => {
19+
expect(language.length).toBe(meta.numSurahs + 1)
20+
})
21+
})
22+
})

0 commit comments

Comments
 (0)