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.centralbank.cy/en/licensing-supervision/payment-institutions/licensing-and-supervision-of-payment-institutions'; test('CYPRUS::WHOIS Test', async function(t) { const s = new Scraper(); t.plan(3); await s._getWhoIsRaw(url).then((r) => { const testReg = /centralbank.cy/; t.equal(testReg.test(r), true, 'Get Raw CY WhoIS'); }); await s._getWhoIsJSON(url).then((r) => { t.deepLooseEqual(r, {}, 'No JSON for Cyprus'); }); await s._getWhoIsIPJSON(url).then((r) => { t.equal(r.originAs, 'AS13335', 'Get JSON WhoIS for IP Address'); }); t.end(); }); test.skip('CYPRUS::SSL Test', async function(t) { const s = new Scraper(); t.plan(1); await s._getSSLCert(url, true).then((r) => { // 00:F2:E1:CE:65:65:E1:29:D3:9B:F1:1F:1C:07:CD:2F:5F t.equal(r.serialNumber, 'A3BB67361D0B08A715FFAF1AC863333C', 'Get SSL Certificate'); }); t.end(); });