@@ -114,7 +114,7 @@ describe('Proving the possession of 10 unique receipts, with each recent enough
114114 id : 'e-123-987-1-22-' + ( i + 1 ) . toString ( ) , // Unique id for each receipt
115115 date : minDate + 1000 * ( i + 1 ) ,
116116 posId : '1234567' ,
117- amount : minAmount + Math . floor ( Math . random ( ) * 100 ) ,
117+ amount : minAmount + Math . ceil ( Math . random ( ) * 100 ) ,
118118 otherDetails : Math . random ( ) . toString ( 36 ) . slice ( 2 , 20 ) , // https://stackoverflow.com/a/38622545
119119 } ) ;
120120 signed . push ( signMessageObject ( receiptsAttributes [ i ] , sk , label , encoder ) ) ;
@@ -123,14 +123,19 @@ describe('Proving the possession of 10 unique receipts, with each recent enough
123123 } ) ;
124124
125125 it ( 'proof verifies when all receipt ids are different' , ( ) => {
126- // Check that receipt ids are indeed different
127126 const ids = new Set < string > ( ) ;
128127 for ( let i = 0 ; i < numReceipts ; i ++ ) {
129128 // @ts -ignore
130129 ids . add ( receiptsAttributes [ i ] . id ) ;
130+ //
131+ expect ( receiptsAttributes [ i ] [ 'amount' ] > minAmount ) ;
132+ expect ( receiptsAttributes [ i ] [ 'date' ] > minDate ) ;
131133 }
134+ // Check that receipt ids are indeed different
132135 expect ( ids . size ) . toEqual ( numReceipts ) ;
133136
137+
138+
134139 // Reveal "posId" attribute in all 10 receipts
135140
136141 const revealedNames = new Set < string > ( ) ;
0 commit comments