Browse Source

Check in binary test that data actually is binary

extract-response
Luke Childs 8 years ago
parent
commit
7d4365ec25
  1. 1
      test/cache.js

1
test/cache.js

@ -50,6 +50,7 @@ test('Binary responses are cached', async t => {
const firstResponse = await got(s.url + endpoint, {cache, encoding});
const secondResponse = await got(s.url + endpoint, {cache, encoding});
t.true(firstResponse.body instanceof Buffer);
t.is(firstResponse.body.toString(), secondResponse.body.toString());
});

Loading…
Cancel
Save