jest-supertest-matchers

[![Code Climate](https://codeclimate.com/github/hexlet/jest-supertest-matchers/badges/gpa.svg)](https://codeclimate.com/github/hexlet/jest-supertest-matchers) [![Issue Count](https://codeclimate.com/github/hexlet/jest-supertest-matchers/badges/issue_count

Usage no npm install needed!

<script type="module">
  import jestSupertestMatchers from 'https://cdn.skypack.dev/jest-supertest-matchers';
</script>

README

jest-supertest-matchers

Code Climate Issue Count Build Status

Setup

import app from '../app';
import matchers from 'jest-supertest-matchers';
import request from 'supertest';

// inside tests
beforeAll(() => {
  expect.extend(matchers);
});

it('example', async () => {
  const res = await request(app).get('/');
  expect(res).toHaveHTTPStatus(200);
});