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

Unexpected plugin for the messy library

  • 2.9.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by53.9%
Maintainers
2
Weekly downloads
 
Created
Source

Unexpected-messy

Plugin for Unexpected that adds the ability to inspect and match instances of the HttpRequest, HttpResponse, HttpExchange, HttpConversation, Mail, and Message classes from the Messy library. It's originally built for unexpected-express and unexpected-http, but can also be used standalone.

In particular, it adds support for the to satisfy assertion so that you can express your assertions using a very compact and precise syntax. When the conditions are not met, you get a full diff that includes the entire object as a single unit:

var messy = require('messy'),
    expect = require('unexpected').clone().installPlugin(require('unexpected-messy'));

expect(new messy.HttpResponse(
    'HTTP/1.1 200 OK\r\n' +
    'Content-Type: application/json\r\n' +
    '\r\n' +
    '{"foo":"bar","baz":456}'
), 'to satisfy', {statusCode: 404, body: {baz: expect.it('to be greater than', 1024)}});

Diff output

NPM version Build Status Coverage Status Dependency Status

License

Unexpected-messy is licensed under a standard 3-clause BSD license -- see the LICENSE file for details.

Keywords

FAQs

Package last updated on 06 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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