File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -529,6 +529,17 @@ const iban: Iban = {
529529 ] ,
530530 format : 'ILkk bbbn nncc cccc cccc ccc' ,
531531 } ,
532+ {
533+ country : 'IR' ,
534+ total : 26 ,
535+ bban : [
536+ {
537+ type : 'n' ,
538+ count : 22 ,
539+ } ,
540+ ] ,
541+ format : 'IRkk bbbb cccc cccc cccc cccc cc' ,
542+ } ,
532543 {
533544 country : 'IT' ,
534545 total : 27 ,
Original file line number Diff line number Diff line change @@ -223,11 +223,11 @@ exports[`finance > 1337 > currencySymbol 1`] = `"$"`;
223223
224224exports [` finance > 1337 > ethereumAddress 1` ] = ` "0x536a7b5fa28d2f9bb79ca46ea394bc4f9bb0af32"` ;
225225
226- exports [` finance > 1337 > iban > noArgs 1` ] = ` "FO2200532700604734 "` ;
226+ exports [` finance > 1337 > iban > noArgs 1` ] = ` "FI1300552916047457 "` ;
227227
228228exports [` finance > 1337 > iban > with formatted and countryCode option 1` ] = ` "DE04 0033 2713 1474 7007 41"` ;
229229
230- exports [` finance > 1337 > iban > with formatted option 1` ] = ` "FO22 0053 2700 6047 34 "` ;
230+ exports [` finance > 1337 > iban > with formatted option 1` ] = ` "FI13 0055 2916 0474 57 "` ;
231231
232232exports [` finance > 1337 > litecoinAddress 1` ] = ` "LhsjwgYJ7oC8ZrMNmqzLbhEubpcw"` ;
233233
Original file line number Diff line number Diff line change @@ -377,6 +377,31 @@ describe('finance_iban', () => {
377377 `First two character should be AL, given is ${ iban . substring ( 0 , 2 ) } `
378378 ) . toBe ( 'AL' ) ;
379379 } ) ;
380+
381+ it ( 'IBAN for Iran is correct' , ( ) => {
382+ const iban = faker . finance . iban ( {
383+ formatted : false ,
384+ countryCode : 'IR' ,
385+ } ) ;
386+ const ibanFormated = prettyPrintIban ( iban ) ;
387+
388+ expect ( iban ) . toSatisfy ( isIBAN ) ;
389+
390+ expect (
391+ 26 ,
392+ `IR IBAN would be 26 chars length, given is ${ iban . length } `
393+ ) . toBe ( iban . length ) ;
394+
395+ expect (
396+ 32 ,
397+ `IR formatted IBAN would be 32 chars length, given is ${ ibanFormated . length } `
398+ ) . toBe ( ibanFormated . length ) ;
399+
400+ expect (
401+ iban . substring ( 0 , 2 ) ,
402+ `First two character should be IR, given is ${ iban . substring ( 0 , 2 ) } `
403+ ) . toBe ( 'IR' ) ;
404+ } ) ;
380405 } ) ;
381406 }
382407 ) ;
You can’t perform that action at this time.
0 commit comments