# jasmine-supertest

> Small library to ease the pain of using SuperTest in combination with Jasmine

Latest version **1.0.0** (published 2016-10-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install jasmine-supertest
pnpm add jasmine-supertest
yarn add jasmine-supertest
bun add jasmine-supertest
```

## 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 | 1.0.0 |
| Published | 2016-10-23 |
| First published | 2016-10-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dominik Ehrenberg |
| Maintainers | djungowski |
| Keywords | jasmine, supertest, testing, javascript |

## Links

- npm: https://www.npmjs.com/package/jasmine-supertest
- Repository: https://github.com/djungowski/jasmine-supertest
- Homepage: https://github.com/djungowski/jasmine-supertest#readme
- Issues: https://github.com/djungowski/jasmine-supertest/issues
- npm.io page: https://npm.io/package/jasmine-supertest

## 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
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-10-23

## README

# jasmine-supertest
[![Build Status](https://travis-ci.org/djungowski/jasmine-supertest.svg?branch=master)](https://travis-ci.org/djungowski/jasmine-supertest)

Small library to ease the pain of using SuperTest in combination with Jasmine

If you use [Supertest](https://github.com/visionmedia/supertest) in combination with Jasmine, you cannot use the done callback out-of-the-box (see https://github.com/jasmine/jasmine-npm/issues/31). This library eases this pain.

## Installation
```bash
npm install jasmine-supertest
```

## Usage
jasmine-supertest simply adds a wrapper function you can use to finish SuperTest testcases. Instead of writing `.end(done)` you simply have to call `finishTestcase(done)`.

```javascript
var server = require('../lib/server');
var supertest = require('supertest');
var finishTestcase = require('jasmine-supertest');

describe('jasmine-supertest test suite', function() {
    it('calls done without any params and finishes the test case is fine', function(done) {
		    var app = supertest(server);
		    app.get('/incorrect-url').expect(404).end(finishTestcase(doneMock));
    });
});
```

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