const tape = require('tape'); const _test = require('tape-promise').default; // <---- notice 'default' const test = _test(tape); // decorate tape const Scraper = require('../helpers/scraper'); const url = 'https://www.dnb.nl/en/supervision/public-register/WFTBI/index.jsp'; test('NETHERLANDS::WHOIS Test', async function(t) { const s = new Scraper(); await s._getWhoIsRaw(url).then((r) => { const testReg = /dnb.nl/; t.equal(testReg.test(r), true, 'Get Raw NL WhoIS'); }); await s._getWhoIsJSON(url).then((r) => { t.deepLooseEqual(r, { 'domainName': 'dnb.nl', 'status': 'active', 'registrar': 'Verizon Nederland B.V.', 'abuseContact': 'DNSSEC: no', 'domainNameservers': 'auth60.ns.nl.uu.net', 'recordMaintainedBy': 'NL Domain Registry' }, 'Get JSON WhoIS'); }); // Turned this test off as the site appears to be hosted by Akami, IP changes almost every time. /* await s._getWhoIsIPJSON(url).then((r) => { console.log(r); t.equal(r.origin, 'AS16625', 'Get JSON WhoIS for IP Address'); });*/ t.end(); }); test.skip('NETHERLANDS::SSL Test', async function(t) { const s = new Scraper(); t.plan(1); await s._getSSLCert(url, true).then((r) => { t.equal(r.serialNumber, '02148C33CEA680D1544BC39C8E6E9268', 'Get SSL Certificate'); }); t.end(); });