diff --git a/test/main.js b/test/main.js index 5ed7771..c3688d0 100644 --- a/test/main.js +++ b/test/main.js @@ -168,6 +168,11 @@ describe('#irs', function() { }); describe('#splitPostpaidDetail', () => { + it('should handle invalid input', () => { + irs.splitPostpaidDetail(null).length.should.equal(0); + irs.splitPostpaidDetail('').length.should.equal(0); + }); + it('should return correct result - inquiry', () => { 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'; const splitted = irs.splitPostpaidDetail(detail);