���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/deps/npm/test/tap/ |
'use strict' const test = require('tap').test const validateCIDRList = require('../../lib/token.js')._validateCIDRList test('validateCIDRList', (t) => { t.plan(10) const single = ['127.0.0.0/24'] const double = ['127.0.0.0/24', '192.168.0.0/16'] const ipv6 = '2620:0:2d0:200::7/32' const ipv6Mixed = ['127.0.0/24', '2620:0:2d0:200::7/32', '192.168.0.0/16'] t.doesNotThrow(() => t.isDeeply(validateCIDRList(single.join(',')), single), 'single string ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(single), single), 'single array ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(double.join(',')), double), 'double string ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(double), double), 'double array ipv4') t.throws(() => validateCIDRList(ipv6)) t.throws(() => validateCIDRList(ipv6Mixed)) t.done() })