Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/ibantools.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ define(["require", "exports"], function (require, exports) {
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-7',
account_indentifier: '13-22',
account_indentifier: '12-22',
},
DJ: {
chars: 27,
Expand Down
2 changes: 1 addition & 1 deletion src/ibantools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ export const countrySpecs: CountryMapInternal = {
IBANRegistry: true,
SEPA: true,
bank_identifier: '0-7',
account_indentifier: '13-22',
account_indentifier: '12-22',
},
DJ: {
chars: 27,
Expand Down
22 changes: 22 additions & 0 deletions test/ibantools_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,28 @@ describe('IBANTools', function() {
});
});

describe('When calling extractIBAN() with valid German IBAN', function () {
var ext = iban.extractIBAN('DE75512108001245126199');
it('valid should be true', function () {
expect(ext.valid).to.be.true;
});
it('IBAN should be DE75512108001245126199', function () {
expect(ext.iban).to.equal('DE75512108001245126199');
});
it('BBAN should be 512108001245126199', function () {
expect(ext.bban).to.equal('512108001245126199');
});
it('countryCode should be DE', function () {
expect(ext.countryCode).to.equal('DE');
});
it('accountNumber should be 1245126199', function () {
expect(ext.accountNumber).to.equal('1245126199');
});
it('bankIdentifier should be 51210800', function () {
expect(ext.bankIdentifier).to.equal('51210800');
});
});

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