diff options
| author | Benjamin MENANT <[email protected]> | 2022-03-21 21:37:03 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-21 13:37:03 +0100 |
| commit | 6050d7acbb991568cbdac7b0c16a088aef200abc (patch) | |
| tree | bc79ad5625da914e5416b2b1289ae164d2950bed /test | |
| parent | af3f99ea0434c84734ef5368fa3bbafbf7a17c4f (diff) | |
| download | faker-6050d7acbb991568cbdac7b0c16a088aef200abc.tar.xz faker-6050d7acbb991568cbdac7b0c16a088aef200abc.zip | |
fix(finance): update iso-3166-1 country codes for IBAN/BIC (#168)
Diffstat (limited to 'test')
| -rw-r--r-- | test/finance.spec.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/finance.spec.ts b/test/finance.spec.ts index 227184c1..d49e29a3 100644 --- a/test/finance.spec.ts +++ b/test/finance.spec.ts @@ -45,7 +45,7 @@ const seedRuns = [ creditCardCVV: '251', ethereumAddress: '0x5c346ba075bd57f5a62b82d72af39cbbb07a98cb', iban: 'FO7710540350900318', - bic: 'OEFELTL1032', + bic: 'OEFELYL1032', transactionDescription: 'deposit transaction at Cronin - Effertz using card ending with ***(...1830) for PEN 262.02 in account ***55239273', }, @@ -473,11 +473,15 @@ describe('finance', () => { ).toStrictEqual(1); }); - it('throws an error if the passed country code is not supported', () => { - expect(() => faker.finance.iban(false, 'AA')).toThrowError( - Error('Country code AA not supported.') - ); - }); + it.each(['AA', 'EU'])( + 'throws an error for unsupported country code "%s"', + (unsupportedCountryCode) => + expect(() => + faker.finance.iban(false, unsupportedCountryCode) + ).toThrowError( + Error(`Country code ${unsupportedCountryCode} not supported.`) + ) + ); }); describe('bic()', () => { |
