You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

unexpected-http

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected-http

Unexpected plugin for testing http servers

3.0.0
Source
npm
Version published
Weekly downloads
44
-73.33%
Maintainers
2
Weekly downloads
 
Created
Source

unexpected-http

Unexpected plugin for testing HTTP servers. Uses same syntax as unexpected-express whenever possible.

Works with node.js and in browsers via browserify (see example).

NPM version Build Status Coverage Status Dependency Status

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

describe('google.com', function () {
    it('should redirect to a country-specific version', function () {
        return expect('GET http://google.com/', 'to yield response', {
            statusCode: 302,
            headers: {
                Location: /www\.google\.\w+/
            },
            body: /The document has moved/
        });
    });
});

Keywords

http

FAQs

Package last updated on 17 Apr 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