describe('Maestro', function() { prefixMaestro = ['5018','5020','5038','6304']; for (let length = 12; length <= 19; length++) { for (let prefix = 0; prefix < prefixMaestro.length; prefix++){ (function(length, prefix){ it ('has a prefix of ' + prefixMaestro[prefix]+ ' and a length of ' +length, function(){ detectNetwork(prefixMaestro[prefix].padEnd(length,'0')).should.equal('Maestro') }); })(length, prefix); } } });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter