doc: set timeout of url validator request to 5000ms

This commit is contained in:
Jennifer Shehane
2017-06-16 14:48:31 -04:00
parent a1a5dcd0aa
commit 61a62d78a0

View File

@@ -60,7 +60,10 @@ function assertHashIsPresent (descriptor, source, hash, html, tag = 'url') {
function validateExternalUrl (href, source) {
const { hash } = url.parse(href)
return request(href)
return request({
url: href,
timeout: 5000,
})
.then((html) => {
// bail if we dont have a hash
if (!hash) {