fix: encoding request response as null

This fixes an issue with gzipped content
pull/1/head
Adam Pash 8 years ago
parent ddc684c7d3
commit dfb5334f18

@ -26,7 +26,7 @@ describe('extractCleanNode(article, $, { cleanConditionally })', () => {
// console.log(result)
// console.log(bestNode.html())
assert.equal($(bestNode).text().length, 3652)
assert.equal($(bestNode).text().length, 2687)
})
})

@ -23,6 +23,7 @@ export default async function fetchResource(url) {
url: parsedUrl,
headers: REQUEST_HEADERS,
timeout: FETCH_TIMEOUT,
encoding: null,
}
const { response, body } = await get(options)

@ -13,7 +13,7 @@ describe('fetchResource(url)', () => {
const url = 'http://theconcourse.deadspin.com/1786177057'
const { body, response } = await fetchResource(url)
assert.equal(typeof body, 'string')
assert.equal(typeof body, 'object')
})
})

Loading…
Cancel
Save