Skip to content

Commit 10ffc86

Browse files
author
Danial
committed
🧪 TEST: add missing isIBAN tests
1 parent 8dc7fbd commit 10ffc86

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import test from '../testFunctions';
2+
3+
describe('isIBAN', () => {
4+
it('should validate IBANs', () => {
5+
test({
6+
validator: 'isIBAN',
7+
valid: [
8+
'IR576406610070915600106898',
9+
],
10+
invalid: [
11+
// Invalid format/checksum
12+
'IR545049154806779008008299',
13+
14+
// Invalid structure
15+
'IR5750491548067790080082',
16+
17+
// Country code not in whitelist when specified
18+
// Empty/null values
19+
'',
20+
' ',
21+
22+
// Random invalid strings
23+
'not an iban',
24+
'1234567890',
25+
'ABCD1234567890',
26+
],
27+
});
28+
});
29+
});

0 commit comments

Comments
 (0)