1.2.0 • Published 7 months ago

tepper v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Tepper

GitHub Workflow Status codecov npm MIT License PRs Welcome

Modern HTTP expectation library inspired in supertest

About

This library is a modern implementation of supertest, typescript-first and promise first for the modern ages. It supports jest and vitest.

Installation

Install tepper as an npm module and save it to your package.json file as a development dependency:

npm install --save-dev tepper

Example

You may pass an http.Server, or a Function to tepper() - if the server is not already listening for connections then it is bound to an ephemeral port for you so there is no need to keep track of ports.

import tepper from "tepper"
import express from "express"

const app = express()

app.get("/user", (req, res) => {
  res.status(200).json({ name: "john" })
})

const { body } = await tepper(app).get("/user").expect(200).run()

console.log(body)

Notes

Inspired by supertest.

License

MIT

1.2.0

7 months ago

1.1.0

1 year ago

1.0.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.4

2 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.1.8

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago