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); } } });