Comparing version 2.1.6 to 2.1.7
{ | ||
"name": "bluereq", | ||
"version": "2.1.6", | ||
"version": "2.1.7", | ||
"description": "A bluebird promise wrapper for HTTP requests", | ||
@@ -13,11 +13,11 @@ "main": "lib/bluereq.js", | ||
"lodash.pick": "^4.4.0", | ||
"request": "^2.83.0" | ||
"request": "^2.85.0" | ||
}, | ||
"devDependencies": { | ||
"body-parser": "^1.3.0", | ||
"chai": "^1.9.1", | ||
"express": "^4.14.0", | ||
"git-hooks": "^1.1.9", | ||
"http-status": "^0.1.7", | ||
"mocha": "^3.2.0", | ||
"body-parser": "^1.18.2", | ||
"express": "^4.16.3", | ||
"git-hooks": "^1.1.10", | ||
"http-status": "^1.1.0", | ||
"mocha": "^5.1.1", | ||
"should": "^13.2.1", | ||
"standard": "^10.0.3" | ||
@@ -24,0 +24,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,4 +20,4 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.deep.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).deepEqual(expectedRes.body) | ||
done() | ||
@@ -32,4 +32,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.deep.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).deepEqual(expectedRes.body) | ||
done() | ||
@@ -46,3 +46,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -57,3 +57,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -60,0 +60,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -17,4 +17,4 @@ // test server config | ||
.catch(err => { | ||
expect(err.statusCode).to.equal(expectedErr.statusCode) | ||
expect(err.body).to.deep.equal(expectedErr.body) | ||
should(err.statusCode).equal(expectedErr.statusCode) | ||
should(err.body).deepEqual(expectedErr.body) | ||
done() | ||
@@ -21,0 +21,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -17,3 +17,3 @@ // test server config | ||
.then(res => { | ||
expect(res.body.reqHeaders['accept-encoding']).to.equal('gzip, deflate') | ||
should(res.body.reqHeaders['accept-encoding']).equal('gzip, deflate') | ||
done() | ||
@@ -28,3 +28,3 @@ }) | ||
.then(res => { | ||
expect(res.body.reqHeaders['accept-encoding']).not.to.equal('gzip, deflate') | ||
should(res.body.reqHeaders['accept-encoding']).not.equal('gzip, deflate') | ||
done() | ||
@@ -31,0 +31,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,4 +20,4 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body.message).to.equal(expectedRes.body.message) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body.message).equal(expectedRes.body.message) | ||
done() | ||
@@ -32,4 +32,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body.message).to.equal(expectedRes.body.message) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body.message).equal(expectedRes.body.message) | ||
done() | ||
@@ -47,3 +47,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -58,3 +58,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -61,0 +61,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,4 +20,4 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).equal(expectedRes.body) | ||
done() | ||
@@ -32,4 +32,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).equal(expectedRes.body) | ||
done() | ||
@@ -47,3 +47,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -58,3 +58,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -61,0 +61,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,5 +20,5 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body.message).to.equal(expectedRes.body.message) | ||
expect(res.body.req).to.deep.equal({}) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body.message).equal(expectedRes.body.message) | ||
should(res.body.req).deepEqual({}) | ||
done() | ||
@@ -33,4 +33,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.deep.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).deepEqual(expectedRes.body) | ||
done() | ||
@@ -48,3 +48,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -59,3 +59,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -62,0 +62,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,5 +20,5 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body.message).to.equal(expectedRes.body.message) | ||
expect(res.body.req).to.deep.equal({}) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body.message).equal(expectedRes.body.message) | ||
should(res.body.req).deepEqual({}) | ||
done() | ||
@@ -33,6 +33,6 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(typeof res.body === 'string').to.be.a.true() | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(typeof res.body === 'string').be.true() | ||
const body = JSON.parse(res.body) | ||
expect(body.message).to.equal(expectedRes.body.message) | ||
should(body.message).equal(expectedRes.body.message) | ||
done() | ||
@@ -47,4 +47,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.deep.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).deepEqual(expectedRes.body) | ||
done() | ||
@@ -66,3 +66,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -75,8 +75,8 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
expect(err.statusCode).to.equal(404) | ||
expect(err.statusMessage).to.equal('Not Found') | ||
expect(err.headers).to.exist() | ||
expect(err.body).to.exist() | ||
expect(err.url).to.equal(`${host}/undefined-endpoint`) | ||
should(err).be.ok() | ||
should(err.statusCode).equal(404) | ||
should(err.statusMessage).equal('Not Found') | ||
should(err.headers).be.ok() | ||
should(err.body).be.ok() | ||
should(err.url).equal(`${host}/undefined-endpoint`) | ||
done() | ||
@@ -91,3 +91,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -94,0 +94,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const bluereq = require('../../lib/bluereq') | ||
@@ -20,5 +20,5 @@ // test server config | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body.message).to.equal(expectedRes.body.message) | ||
expect(res.body.req).to.deep.equal({}) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body.message).equal(expectedRes.body.message) | ||
should(res.body.req).deepEqual({}) | ||
done() | ||
@@ -33,4 +33,4 @@ }) | ||
.then(res => { | ||
expect(res.statusCode).to.equal(expectedRes.statusCode) | ||
expect(res.body).to.deep.equal(expectedRes.body) | ||
should(res.statusCode).equal(expectedRes.statusCode) | ||
should(res.body).deepEqual(expectedRes.body) | ||
done() | ||
@@ -48,3 +48,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -59,3 +59,3 @@ }) | ||
.catch(err => { | ||
expect(err).to.exist() | ||
should(err).be.ok() | ||
done() | ||
@@ -62,0 +62,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const getOpts = require('../../lib/get_options') | ||
@@ -9,4 +9,4 @@ | ||
const args = ['http://example.dev'] | ||
expect(getOpts(args).config).to.deep.equal({ url: 'http://example.dev', json: true, gzip: true }) | ||
expect(getOpts(args).callback).to.not.exist() | ||
should(getOpts(args).config).deepEqual({ url: 'http://example.dev', json: true, gzip: true }) | ||
should(getOpts(args).callback).not.be.ok() | ||
}) | ||
@@ -19,4 +19,4 @@ }) | ||
const opts = getOpts(args) | ||
expect(opts.config).to.deep.equal(args[0]) | ||
expect(opts.callback).to.not.exist() | ||
should(opts.config).deepEqual(args[0]) | ||
should(opts.callback).not.be.ok() | ||
}) | ||
@@ -30,4 +30,4 @@ }) | ||
const opts = getOpts(args, true) | ||
expect(opts.config).to.deep.equal({ url: args[0], json: args[1], gzip: true }) | ||
expect(opts.callback).to.not.exist() | ||
should(opts.config).deepEqual({ url: args[0], json: args[1], gzip: true }) | ||
should(opts.callback).not.be.ok() | ||
}) | ||
@@ -34,0 +34,0 @@ }) |
@@ -1,2 +0,2 @@ | ||
const { expect } = require('chai') | ||
const should = require('should') | ||
const sig = require('../../lib/signature_checker') | ||
@@ -11,3 +11,3 @@ const nullFn = () => null | ||
const args = [123] | ||
expect(sig.matches(args, 'number')).to.equal(true) | ||
should(sig.matches(args, 'number')).equal(true) | ||
}) | ||
@@ -17,3 +17,3 @@ | ||
const args = ['123'] | ||
expect(sig.matches(args, 'number')).to.equal(false) | ||
should(sig.matches(args, 'number')).equal(false) | ||
}) | ||
@@ -25,3 +25,3 @@ }) | ||
const args = [{}] | ||
expect(sig.matches(args, 'object')).to.equal(true) | ||
should(sig.matches(args, 'object')).equal(true) | ||
}) | ||
@@ -31,3 +31,3 @@ | ||
const args = [''] | ||
expect(sig.matches(args, 'object')).to.equal(false) | ||
should(sig.matches(args, 'object')).equal(false) | ||
}) | ||
@@ -38,3 +38,3 @@ }) | ||
const args = ['123'] | ||
expect(sig.matches(args, 'string')).to.equal(true) | ||
should(sig.matches(args, 'string')).equal(true) | ||
}) | ||
@@ -44,3 +44,3 @@ | ||
const args = [123] | ||
expect(sig.matches(args, 'string')).to.equal(false) | ||
should(sig.matches(args, 'string')).equal(false) | ||
}) | ||
@@ -51,3 +51,3 @@ | ||
const args = [ () => {} ] | ||
expect(sig.matches(args, 'function')).to.equal(true) | ||
should(sig.matches(args, 'function')).equal(true) | ||
}) | ||
@@ -57,3 +57,3 @@ | ||
const args = [''] | ||
expect(sig.matches(args, 'function')).to.equal(false) | ||
should(sig.matches(args, 'function')).equal(false) | ||
}) | ||
@@ -66,3 +66,3 @@ }) | ||
const args = ['123', {}, 123, nullFn] | ||
expect(sig.matches(args, 'string', 'object', 'number', 'function')).to.equal(true) | ||
should(sig.matches(args, 'string', 'object', 'number', 'function')).equal(true) | ||
}) | ||
@@ -72,3 +72,3 @@ | ||
const args = ['123', {}, 123, nullFn] | ||
expect(sig.matches(args, 'object', 'number', 'function', 'string')).to.equal(false) | ||
should(sig.matches(args, 'object', 'number', 'function', 'string')).equal(false) | ||
}) | ||
@@ -78,3 +78,3 @@ | ||
const args = [1] | ||
expect(sig.matches(args, 'number', 'number')).to.equal(false) | ||
should(sig.matches(args, 'number', 'number')).equal(false) | ||
}) | ||
@@ -84,3 +84,3 @@ | ||
const args = [1, 2, 3] | ||
expect(sig.matches(args, 'number', 'number')).to.equal(false) | ||
should(sig.matches(args, 'number', 'number')).equal(false) | ||
}) | ||
@@ -90,5 +90,5 @@ | ||
const args = ['123', {}, 123, nullFn] | ||
expect(sig.matches(args, 'string', 'object', 'number', 'number')).to.equal(false) | ||
expect(sig.matches(args, 'string', 'number', 'number', 'number')).to.equal(false) | ||
expect(sig.matches(args, 'number', 'number', 'number', 'number')).to.equal(false) | ||
should(sig.matches(args, 'string', 'object', 'number', 'number')).equal(false) | ||
should(sig.matches(args, 'string', 'number', 'number', 'number')).equal(false) | ||
should(sig.matches(args, 'number', 'number', 'number', 'number')).equal(false) | ||
}) | ||
@@ -95,0 +95,0 @@ }) |
Sorry, the diff of this file is not supported yet
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
64373
Updatedrequest@^2.85.0