link-check
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -44,2 +44,3 @@ "use strict"; | ||
}, | ||
maxRedirects: 8, | ||
strictSSL: false | ||
@@ -46,0 +47,0 @@ }; |
{ | ||
"name": "link-check", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "checks whether a hyperlink is alive (200 OK) or dead", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,2 +28,6 @@ 'use strict'; | ||
}); | ||
app.get('/loop', function (req, res) { | ||
res.redirect('/loop'); | ||
}); | ||
@@ -135,2 +139,13 @@ var server = http.createServer(app); | ||
}); | ||
it('should handle redirect loops', function (done) { | ||
linkCheck(baseUrl + '/loop', function (err, result) { | ||
expect(err).to.be(null); | ||
expect(result.link).to.be(baseUrl + '/loop'); | ||
expect(result.status).to.be('dead'); | ||
expect(result.statusCode).to.be(0); | ||
expect(result.err.message).to.contain('Exceeded maxRedirects.'); | ||
done(); | ||
}); | ||
}); | ||
}); |
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
11766
198