Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unexpected-messy

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected-messy - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

24

lib/unexpectedMessy.js

@@ -207,2 +207,16 @@ var messy = require('messy'),

expectedBody = upgradedOrDowngradedMessageBodyAndSpecBody.specBody;
if (value && typeof value === 'object') {
this.errorMode = 'nested';
if ('fileName' in value) {
expect(subject, 'to have file name satisfying', value.fileName);
}
if ('decodedBody' in value) {
expect(subject, 'to have decoded body satisfying', value.decodedBody);
}
if ('text' in value) {
expect(subject.toString(), 'to equal', value.text);
}
this.errorMode = 'default';
}
try {

@@ -537,4 +551,4 @@ if (typeof value === 'string') {

}
if (message.isMultipart && message.boundary && Array.isArray(message.body)) {
message.body.forEach(function (part) {
if (message.isMultipart) {
message.parts.forEach(function (part) {
output

@@ -600,2 +614,8 @@ .text('--' + message.boundary, 'green')

}).addAssertion('messy.Message', 'to [exhaustively] satisfy', expectMessageToSatisfy)
.addAssertion('messy.Message', 'to have decoded body satisfying', function (expect, subject, value) {
expect(subject.decodedBody, 'to satisfy', value);
})
.addAssertion('messy.Message', 'to have file name satisfying', function (expect, subject, value) {
expect(subject.fileName, 'to satisfy', value);
})
.addType({

@@ -602,0 +622,0 @@ name: 'messy.RequestLine',

6

package.json
{
"name": "unexpected-messy",
"version": "2.5.0",
"version": "2.6.0",
"description": "Unexpected plugin for the messy library",

@@ -35,3 +35,3 @@ "main": "lib/unexpectedMessy.js",

"peerDependencies": {
"messy": "^3.2.0",
"messy": "^4.0.0",
"unexpected": "5"

@@ -43,3 +43,3 @@ },

"jshint": "2.5.5",
"messy": "3.2.0",
"messy": "4.0.0",
"mocha": "2.0.1",

@@ -46,0 +46,0 @@ "unexpected": "5.1.0"

Sorry, the diff of this file is too big to display

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