Comparing version 0.0.3 to 0.0.4
@@ -253,5 +253,5 @@ 'use strict'; | ||
}) | ||
.catch(error => cb(null, error.message)); | ||
.catch(error => reject(error.message)); | ||
}); | ||
} | ||
} |
{ | ||
"name": "page-data", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "simple page data get client tool", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
const page = require('./index'); | ||
var cb = function(res, error) { | ||
console.log(res); | ||
} | ||
// var cb = function(res, error) { | ||
// console.log(res); | ||
// } | ||
@@ -27,3 +27,3 @@ // var req = page.status('https://github.com'); | ||
var req = page.meta('https://github.com'); | ||
var req = page.meta('https://93.184.216.34'); | ||
req.then(res => { | ||
@@ -30,0 +30,0 @@ console.log(res) |
@@ -99,2 +99,11 @@ 'use strict'; | ||
test('.meta() with callback is return error message', t => { | ||
const url = 'https://93.184.216.34', | ||
cb = (_, error) => { | ||
t.is(error, 'Hostname/IP doesn\'t match certificate\'s altnames: "IP: 93.184.216.34 is not in the cert\'s list:"'); | ||
}; | ||
page.meta(url, cb); | ||
}); | ||
test('.getPort() is return port number', t => { | ||
@@ -101,0 +110,0 @@ const getPort = app.__get__('getPort'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32719
437