Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oliverjash/any-http-integration-test-helpers


https://github.com/oliverjash/any-http-integration-test-helpers

Last synced: 25 days ago
JSON representation

Awesome Lists containing this project

README

        

# AnyHTTP Integration Test Helpers

Example usage:

``` js
import { createStubServer, closeStubServer } from 'any-http-integration-test-helpers';

describe('Http integration', () => {
afterEach(closeStubServer);

it('should make the request and resolve if the response has a good status code', () =>
createStubServer({ status: 200, headers: {}, body: 'foo' })
.then(() => {
// …
}));
});
```