# unexpected-http-alexjeffburke

> Unexpected plugin for testing http servers

Latest version **5.5.0-patch2** (published 2016-07-02) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install unexpected-http-alexjeffburke
pnpm add unexpected-http-alexjeffburke
yarn add unexpected-http-alexjeffburke
bun add unexpected-http-alexjeffburke
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.5.0-patch2 |
| Published | 2016-07-02 |
| First published | 2016-06-30 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Andreas Lind |
| Maintainers | alexjeffburke |
| Keywords | http, test, assertion, server, client |

## Links

- npm: https://www.npmjs.com/package/unexpected-http-alexjeffburke
- Repository: https://github.com/alexjeffburke/unexpected-http
- Homepage: https://github.com/unexpectedjs/unexpected-http
- Issues: https://github.com/unexpectedjs/unexpected-http/issues
- npm.io page: https://npm.io/package/unexpected-http-alexjeffburke

## Dependencies (5)

- [messy](https://npm.io/package/messy.md) ^6.6.1
- [passerror](https://npm.io/package/passerror.md) 1.1.0
- [underscore](https://npm.io/package/underscore.md) 1.7.0
- [unexpected-messy](https://npm.io/package/unexpected-messy.md) ^6.0.0
- [http-browserify-alexjeffburke](https://npm.io/package/http-browserify-alexjeffburke.md) 1.7.0-patch1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 5.5.0-patch2 (latest) — 2016-07-02
- 5.5.0-patch1 — 2016-06-30

## README

unexpected-http
===============

[Unexpected](http://github.com/unexpectedjs/unexpected) plugin for testing HTTP servers. Uses same syntax as [unexpected-express](https://github.com/unexpectedjs/unexpected-express) whenever possible.

Works with node.js and in browsers via [browserify](http://browserify.org) (see [example](tests/index.html)).

[![NPM version](https://badge.fury.io/js/unexpected-http.svg)](http://badge.fury.io/js/unexpected-http)
[![Build Status](https://travis-ci.org/unexpectedjs/unexpected-http.svg?branch=master)](https://travis-ci.org/unexpectedjs/unexpected-http)
[![Coverage Status](https://coveralls.io/repos/unexpectedjs/unexpected-http/badge.svg)](https://coveralls.io/r/unexpectedjs/unexpected-http)
[![Dependency Status](https://david-dm.org/unexpectedjs/unexpected-http.svg)](https://david-dm.org/unexpectedjs/unexpectetd-http)

```javascript
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/
        });
    });
});
```

---
_Source: https://npm.io/package/unexpected-http-alexjeffburke · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
