Commit a79b1614c3eaac6fa74379273193634546281c47
1 parent
27a59eca52
Exists in
master
More test
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
test/main.js
... | ... | @@ -168,6 +168,11 @@ describe('#irs', function() { |
168 | 168 | }); |
169 | 169 | |
170 | 170 | describe('#splitPostpaidDetail', () => { |
171 | + it('should handle invalid input', () => { | |
172 | + irs.splitPostpaidDetail(null).length.should.equal(0); | |
173 | + irs.splitPostpaidDetail('').length.should.equal(0); | |
174 | + }); | |
175 | + | |
171 | 176 | it('should return correct result - inquiry', () => { |
172 | 177 | const detail = 'NAMA:MUSHOLLA-NURUL-KHOIR/DAYA:450/TARIF:S2/JMLBLN:1BLN/PERIODE:201712/METERKINI:18984/METERLALU:18932/TAGIHAN:14441/ADM:1600/DENDA:3000/TOTALTAGIHAN:19041'; |
173 | 178 | const splitted = irs.splitPostpaidDetail(detail); |