@@ -32,7 +32,7 @@ describe("EliD API contract", () => {
3232 } ,
3333 ] ;
3434
35- test . each ( successTestCases ) (
35+ it . each ( successTestCases ) (
3636 "$nhsNumber should be $expectedStatus with cohort $expectCohortElement" ,
3737 async ( { nhsNumber, expectedStatus, expectCohortElement } ) => {
3838 const eligibilityForPerson = await getEligibilityForPerson ( VaccineType . RSV , nhsNumber ) ;
@@ -46,6 +46,7 @@ describe("EliD API contract", () => {
4646 }
4747 expect ( eligibilityForPerson . eligibilityError ) . toBeUndefined ( ) ;
4848 } ,
49+ 10000 ,
4950 ) ;
5051 } ) ;
5152
@@ -57,12 +58,19 @@ describe("EliD API contract", () => {
5758 { nhsNumber : "9436793375" as NhsNumber , expectedError : EligibilityErrorTypes . ELIGIBILITY_LOADING_ERROR } ,
5859 ] ;
5960
60- it . each ( failureTestCases ) ( `$nhsNumber should have error $expectedError ` , async ( { nhsNumber, expectedError } ) => {
61- const eligibilityForPerson : EligibilityForPersonType = await getEligibilityForPerson ( VaccineType . RSV , nhsNumber ) ;
61+ it . each ( failureTestCases ) (
62+ `$nhsNumber should have error $expectedError ` ,
63+ async ( { nhsNumber, expectedError } ) => {
64+ const eligibilityForPerson : EligibilityForPersonType = await getEligibilityForPerson (
65+ VaccineType . RSV ,
66+ nhsNumber ,
67+ ) ;
6268
63- expect ( Object . keys ( eligibilityForPerson ) . length ) . toEqual ( 2 ) ;
64- expect ( eligibilityForPerson . eligibility ) . toBeUndefined ( ) ;
65- expect ( eligibilityForPerson . eligibilityError ) . toEqual ( expectedError ) ;
66- } ) ;
69+ expect ( Object . keys ( eligibilityForPerson ) . length ) . toEqual ( 2 ) ;
70+ expect ( eligibilityForPerson . eligibility ) . toBeUndefined ( ) ;
71+ expect ( eligibilityForPerson . eligibilityError ) . toEqual ( expectedError ) ;
72+ } ,
73+ 10000 ,
74+ ) ;
6775 } ) ;
6876} ) ;
0 commit comments