Skip to content

Commit

Permalink
Fixed specs for Slovenian IBAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dabianco authored and Simplify committed Nov 21, 2023
1 parent bf5d452 commit be43ebb
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-11-13 Davide Bianco <d.bianco@ermes.company>
* Fixed specs for Slovenian IBAN

2023-10-14 Saša Jovanić <sasa@simplify.ba>
* Version 4.3.5
* Added script to parse IBAN specification provided as text file
Expand Down
5 changes: 3 additions & 2 deletions dist/ibantools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1565,8 +1565,9 @@ define(["require", "exports"], function (require, exports) {
bban_validation_func: checkMod9710BBAN,
IBANRegistry: true,
SEPA: true,
bank_identifier: '-1-4',
account_indentifier: '4-19',
branch_indentifier: '2-4',
bank_identifier: '0-1',
account_indentifier: '9-16',
},
SJ: {},
SK: {
Expand Down
5 changes: 3 additions & 2 deletions script/iban_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,9 @@ export const autogeneratedCountrySpecs = {
bban_regexp: '^[0-9]{5}[0-9]{8}[0-9]{2}$',
IBANRegistry: true,
SEPA: true,
bank_identifier: '-1-4',
account_indentifier: '4-19',
branch_indentifier: '2-4',
bank_identifier: '0-1',
account_indentifier: '9-16',
},
SK: {
chars: 24,
Expand Down
5 changes: 3 additions & 2 deletions src/ibantools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1683,8 +1683,9 @@ export const countrySpecs: CountryMapInternal = {
bban_validation_func: checkMod9710BBAN,
IBANRegistry: true,
SEPA: true,
bank_identifier: '-1-4',
account_indentifier: '4-19',
branch_indentifier: '2-4',
bank_identifier: '0-1',
account_indentifier: '9-16',
},
SJ: {},
SK: {
Expand Down
25 changes: 25 additions & 0 deletions test/ibantools_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,31 @@ describe('IBANTools', function() {
});
});

describe('When calling extractIBAN() with valid Slovenian IBAN', function() {
var ext = iban.extractIBAN('SI56263300012039086');
it('valid should be true', function() {
expect(ext.valid).to.be.true;
});
it('IBAN should be SI56263300012039086', function() {
expect(ext.iban).to.equal('SI56263300012039086');
});
it('BBAN should be 263300012039086', function() {
expect(ext.bban).to.equal('263300012039086');
});
it('countryCode should be SI', function() {
expect(ext.countryCode).to.equal('SI');
});
it('accountNumber should be 00120390', function() {
expect(ext.accountNumber).to.equal('00120390');
});
it('bankIdentifier should be 26', function() {
expect(ext.bankIdentifier).to.equal('26');
});
it('branchIdentifier should be 330', function() {
expect(ext.branchIdentifier).to.equal('330');
});
});

describe('When calling extractIBAN() with invalid IBAN', function() {
var ext = iban.extractIBAN('BR970036030510009795493P1');
it('valid should be false', function() {
Expand Down

0 comments on commit be43ebb

Please sign in to comment.