New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

balena-request

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-request - npm Package Compare versions

Comparing version 11.5.5-thgreasi-patch-1ssdasd-322148470c6d0ad199a3df362f818a0186c55cf3 to 11.5.5-thgreasi-patch-1ssdasd-78dff444e207df7d6838f0e8bdf25b8673c065d6

4

package.json
{
"name": "balena-request",
"version": "11.5.5-thgreasi-patch-1ssdasd-322148470c6d0ad199a3df362f818a0186c55cf3",
"version": "11.5.5-thgreasi-patch-1ssdasd-78dff444e207df7d6838f0e8bdf25b8673c065d6",
"description": "Balena HTTP client",

@@ -73,4 +73,4 @@ "main": "build/request.js",

"versionist": {
"publishedAt": "2022-04-06T15:17:18.861Z"
"publishedAt": "2022-04-06T15:35:41.370Z"
}
}

@@ -159,3 +159,3 @@ const ReadableStream = require('stream').Readable;

describe('given a response with a string error property', function () {
describe('given a response with a string message property', function () {
beforeEach(function () {

@@ -170,8 +170,40 @@ return (this.response = {

it('should print the error.text property', function () {
it('should print the body.message property', function () {
const error = utils.getErrorMessageFromResponse(this.response);
return expect(error).to.deep.equal(this.response.body);
expect(error).to.deep.equal(this.response.body.message);
});
});
describe('given a response with a string error property', function () {
beforeEach(function () {
return (this.response = {
body: {
error: 'errorTypeSlug',
},
});
});
it('should print the body.error property', function () {
const error = utils.getErrorMessageFromResponse(this.response);
expect(error).to.deep.equal(this.response.body.error);
});
});
// TODO: Improve this so that we can drop this test case
describe('given a response with an object response w/o any known message property', function () {
beforeEach(function () {
return (this.response = {
body: {
error2: 'errorTypeSlug',
message2: 'More details about the error',
},
});
});
it('should return the whole body', function () {
const error = utils.getErrorMessageFromResponse(this.response);
expect(error).to.deep.equal(this.response.body);
});
});
describe('given a response without an error object', function () {

@@ -178,0 +210,0 @@ beforeEach(function () {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc