New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

unexpected-http

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
u

unexpected-http

Unexpected plugin for testing http servers

1.1.6
Version published
Weekly downloads
5
-80.77%
Maintainers
1
Weekly downloads
 
Created
Issues
4

unexpected-http

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

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 (done) {
        expect('GET http://google.com/', 'to yield response', {
            statusCode: 302,
            headers: {
                Location: /www\.google\.\w+/
            },
            body: /The document has moved/
        }, done);
    });
});

FAQs

Package last updated on 05 Dec 2014

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