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 4.2.0 to 4.3.0

3

generate-site.js

@@ -1,4 +0,5 @@

/*global messy:true*/
/*global messy:true, global*/
var argv = require('minimist')(process.argv.slice(2));
global.require = require;
messy = require('messy');

@@ -5,0 +6,0 @@ var unexpected = require('unexpected').clone().installPlugin(require('./lib/unexpectedMessy'));

{
"name": "unexpected-messy",
"version": "4.2.0",
"version": "4.3.0",
"description": "Unexpected plugin for the messy library",

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

"generate-site": "node ./generate-site.js",
"update-examples": "node ./generate-site.js --update-examples"
"update-examples": "node ./generate-site.js --update-examples && npm run generate-site"
},

@@ -38,4 +38,4 @@ "repository": {

"peerDependencies": {
"messy": "^6.3.0",
"unexpected": "8 || 9"
"messy": "^6.4.0",
"unexpected": "9"
},

@@ -46,6 +46,6 @@ "devDependencies": {

"jshint": "2.5.5",
"messy": "6.3.0",
"messy": "6.4.0",
"mocha": "2.2.5",
"unexpected": "8.5.0",
"unexpected-documentation-site-generator": "2.2.3"
"unexpected": "9.0.0",
"unexpected-documentation-site-generator": "2.5.1"
},

@@ -52,0 +52,0 @@ "dependencies": {

@@ -78,2 +78,45 @@ /*global unexpected*/

it("assertions/messy.HttpResponse/to-satisfy.md contains correct examples", function () {
var testPromises = [];
try {
var httpResponse = new messy.HttpResponse({
headers: {
'Content-Type': 'image/png'
},
body: require('fs').readFileSync('node_modules/unexpected/node_modules/magicpen/images/magic-pen-6-colours.jpg')
});
expect(httpResponse, 'to satisfy', { headers: { 'Content-Type': 'image/gif' } });
expect.fail(function (output) {
output.error("expected:").nl();
output.code("var httpResponse = new messy.HttpResponse({").nl();
output.code(" headers: {").nl();
output.code(" 'Content-Type': 'image/png'").nl();
output.code(" },").nl();
output.code(" body: require('fs').readFileSync('node_modules/unexpected/node_modules/magicpen/images/magic-pen-6-colours.jpg')").nl();
output.code("});").nl();
output.code("").nl();
output.code("expect(httpResponse, 'to satisfy', { headers: { 'Content-Type': 'image/gif' } });").nl();
output.error("to throw");
});
} catch (e) {
expect(e, "to have message",
"expected\n" +
"\n" +
"Content-Type: image/png\n" +
"\n" +
"Buffer([0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01 /* 13493 more */ ])\n" +
"to satisfy { headers: { 'Content-Type': 'image/gif' } }\n" +
"\n" +
"\n" +
"Content-Type: image/png // should equal image/gif\n" +
" // -image/png\n" +
" // +image/gif\n" +
"\n" +
"Buffer([0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01 /* 13493 more */ ])"
);
}
return expect.promise.all(testPromises);
});
it("index.md contains correct examples", function () {

@@ -80,0 +123,0 @@ var testPromises = [];

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

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