Skip to content

Commit

Permalink
Update got version to 9.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Jul 11, 2019
1 parent e2b127c commit cf60dd7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -42,7 +42,7 @@ function Embedza(options) {
cache: new Cache(),
// Default options for `got` in `.request()` method
request: {
retries: 1, // Default (5) hangs too long
retry: 1, // Default (5) hangs too long
timeout: 15 * 1000,
headers: {
'user-agent': defaultAgent
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"cheerio": "^0.22.0",
"debug": "^4.1.1",
"got": "^8.0.0",
"got": "^9.6.0",
"lodash": "^4.0.0",
"probe-image-size": "^4.0.0"
},
Expand All @@ -29,7 +29,7 @@
"eslint": "^5.16.0",
"express": "^4.16.4",
"mocha": "^6.1.4",
"nock": "^10.0.6",
"nock": "^11.0.0-beta.13",
"nyc": "^14.1.0",
"pug": "^2.0.3",
"supertest": "^4.0.2"
Expand Down
6 changes: 5 additions & 1 deletion test/test_fetchers.js
Expand Up @@ -4,7 +4,11 @@
const assert = require('assert');
const nock = require('nock');
const fetchers = require('../lib/fetchers');
const got = require('got');
const _got = require('got');

function got(url, args) {
return _got(url, Object.assign({ retry: 0 }, args));
}


describe('fetchers', function () {
Expand Down
10 changes: 7 additions & 3 deletions test/test_mixins_after.js
Expand Up @@ -5,7 +5,11 @@ const assert = require('assert');
const nock = require('nock');
const mixinsAfter = require('../lib/mixins_after');
const Cache = require('../lib/cache');
const got = require('got');
const _got = require('got');

function got(url, args) {
return _got(url, Object.assign({ retry: 0 }, args));
}


function createBuffer(src, opts) {
Expand Down Expand Up @@ -342,14 +346,14 @@ describe('mixins after', function () {
},
result: {
snippets: [
{ media: {}, href: 'http://' }
{ media: {}, href: '!@#$%^&*' }
]
}
};

await assert.rejects(
mixin.fn(env),
/Invalid URL/
/URI malformed/
);
});
});

0 comments on commit cf60dd7

Please sign in to comment.