File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ export const handlers = [
313
313
rub_number : 1 ,
314
314
sajdah_type : null ,
315
315
sajdah_number : null ,
316
+ text_indopak_nastaleeq :
317
+ 'بِسْمِ اللّٰهِ الرَّحْمٰنِ الرَّحِیْمِ ۟' ,
316
318
words : [
317
319
{
318
320
id : 1 ,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export interface Verse {
21
21
textImlaei ?: string ;
22
22
textImlaeiSimple ?: string ;
23
23
textIndopak ?: string ;
24
+ textIndopakNastaleeq ?: string ;
24
25
sajdahNumber : null ;
25
26
// sajdahType: null;
26
27
imageUrl ?: string ;
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export type VerseField =
90
90
| 'textImlaei'
91
91
| 'textImlaeiSimple'
92
92
| 'textIndopak'
93
+ | 'textIndopakNastaleeq'
93
94
| 'textUthmaniTajweed'
94
95
| 'imageUrl'
95
96
| 'imageWidth'
Original file line number Diff line number Diff line change
1
+ import { expect , it , vi } from 'vitest' ;
1
2
import { createApiTest } from './utils' ;
3
+ import * as internalFetcher from '../src/sdk/v4/_fetcher' ;
2
4
3
5
createApiTest ( 'verses' , {
4
6
findByChapter : {
@@ -7,6 +9,32 @@ createApiTest('verses', {
7
9
} ,
8
10
params : [ '1' ] ,
9
11
rejectParams : [ '0' as any ] ,
12
+ customCases : ( method ) => {
13
+ it ( 'should return indopak_nastaleeq text' , async ( ) => {
14
+ const fetcherSpy = vi . spyOn ( internalFetcher , 'fetcher' ) ;
15
+
16
+ const response = await method ( 1 , {
17
+ fields : { textIndopakNastaleeq : true } ,
18
+ } ) ;
19
+
20
+ const expectedIndopakNastaleeqText =
21
+ 'بِسْمِ اللّٰهِ الرَّحْمٰنِ الرَّحِیْمِ ۟' ;
22
+
23
+ expect ( fetcherSpy ) . toHaveBeenCalledWith (
24
+ '/verses/by_chapter/1' ,
25
+ {
26
+ language : 'ar' ,
27
+ perPage : 50 ,
28
+ words : false ,
29
+ fields : 'text_indopak_nastaleeq' ,
30
+ } ,
31
+ undefined
32
+ ) ;
33
+ expect ( response [ 0 ] . textIndopakNastaleeq ) . toBe (
34
+ expectedIndopakNastaleeqText
35
+ ) ;
36
+ } ) ;
37
+ } ,
10
38
} ,
11
39
findByJuz : {
12
40
expect : {
You can’t perform that action at this time.
0 commit comments