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.2.5 to 2.2.6

18

lib/unexpectedMessy.js

@@ -228,6 +228,6 @@ var messy = require('messy'),

output.append(expect.inspect(subject.headers));
} catch (e) {
output.append(e.createDiff(output.clone(), diff, inspect, equal).diff);
} catch (e2) {
output.append(e2.createDiff(output.clone(), diff, inspect, equal).diff);
}
var bodyDiffError,
var bodySatisfyError,
bodyDiffResult;

@@ -237,5 +237,5 @@ if ('body' in value) {

expect(subjectBody, 'to satisfy', expectedBody);
} catch (e) {
bodyDiffError = e;
bodyDiffResult = e.createDiff && e.createDiff(output.clone(), diff, inspect, equal);
} catch (e3) {
bodySatisfyError = e3;
bodyDiffResult = bodySatisfyError.createDiff && bodySatisfyError.createDiff(output.clone(), diff, inspect, equal);
}

@@ -253,5 +253,7 @@ }

}
if (bodyDiffError) {
output.sp().error('// ' + (bodyDiffError.label || 'should satisfy') + ' ').append(inspect(expectedBody));
if (bodySatisfyError) {
output.sp().error('// ' + (bodySatisfyError.label || 'should satisfy') + ' ').append(inspect(expectedBody));
}
} else if (bodySatisfyError) {
output.nl(2).error('// ' + (bodySatisfyError.label || 'should satisfy') + ' ').append(inspect(expectedBody));
} else if (flags.exhaustively && !subject.hasEmptyBody()) {

@@ -258,0 +260,0 @@ if (typeof subjectBody === 'string') {

{
"name": "unexpected-messy",
"version": "2.2.5",
"version": "2.2.6",
"description": "Unexpected plugin for the messy library",

@@ -5,0 +5,0 @@ "main": "lib/unexpectedMessy.js",

@@ -440,2 +440,13 @@ /*global describe, it*/

});
it('should produce sensible output when matching an empty body against a regexp', function () {
expect(function () {
expect(new Message({headers: {Foo: 'a'}, body: ''}), 'to satisfy', {body: /bar/});
}, 'to throw',
'expected Foo: a to satisfy { body: /bar/ }\n' +
'\n' +
'Foo: a\n' +
'\n' +
'// should match /bar/');
});
});

@@ -442,0 +453,0 @@ });

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