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

unexpected-messy

Package Overview
Dependencies
Maintainers
1
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 1.2.1 to 1.3.0

26

lib/unexpectedMessy.js

@@ -91,2 +91,3 @@ var messy = require('messy'),

function expectMessageToSatisfy(expect, subject, value) {
subject.upgradeOrDowngradeBodyToMatchSpec(value);
try {

@@ -98,5 +99,4 @@ if (typeof value === 'string') {

subject.upgradeOrDowngradeBodyToMatchSpec(value);
if ('body' in value) {
if (isRegExp(value.body)) {
if (isRegExp(value.body) || typeof value.body === 'function') {
expect(subject.body, 'to satisfy', value.body);

@@ -123,3 +123,7 @@ } else {

try {
expect(subject.body, 'to satisfy', value.body);
if (isRegExp(value.body) || typeof value.body === 'function') {
expect(subject.body, 'to satisfy', value.body);
} else {
expect(subject.body, 'to equal', value.body);
}
} catch (e) {

@@ -165,3 +169,3 @@ bodyDiffError = e;

identify: function (obj) {
return obj instanceof messy.Headers;
return obj && obj.isMessyHeaders;
},

@@ -349,3 +353,3 @@ equal: function (headers1, headers2) {

identify: function (obj) {
return obj instanceof messy.Message;
return obj && obj.isMessyMessage;
},

@@ -421,3 +425,3 @@ equal: function (message1, message2) {

identify: function (obj) {
return obj instanceof messy.RequestLine;
return obj && obj.isMessyRequestLine;
},

@@ -499,3 +503,3 @@ equal: function (requestLine1, requestLine2) {

identify: function (obj) {
return obj instanceof messy.HttpRequest;
return obj && obj.isMessyHttpRequest;
},

@@ -565,3 +569,3 @@ equal: function (httpRequest1, httpRequest2) {

identify: function (obj) {
return obj instanceof messy.StatusLine;
return obj && obj.isMessyStatusLine;
},

@@ -649,3 +653,3 @@ equal: function (statusLine1, statusLine2) {

identify: function (obj) {
return obj instanceof messy.HttpResponse;
return obj && obj.isMessyHttpResponse;
},

@@ -721,3 +725,3 @@ inspect: function (httpResponse, depth, output, inspect) {

identify: function (obj) {
return obj instanceof messy.HttpExchange;
return obj && obj.isMessyHttpExchange;
},

@@ -804,3 +808,3 @@ inspect: function (httpExchange, depth, output, inspect) {

identify: function (obj) {
return obj instanceof messy.HttpConversation;
return obj && obj.isMessyHttpConversation;
},

@@ -807,0 +811,0 @@ inspect: function (httpConversation, depth, output, inspect) {

{
"name": "unexpected-messy",
"version": "1.2.1",
"version": "1.3.0",
"description": "Unexpected plugin for the messy library",

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

"peerDependencies": {
"messy": "~1.2.2",
"messy": "~1.3.1",
"unexpected": ">=5.0.0-beta10"

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

"jshint": "2.5.5",
"messy": "=1.2.2",
"messy": "=1.3.1",
"mocha": "=1.21.4",

@@ -46,0 +46,0 @@ "unexpected": ">=5.0.0-beta10"

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