Skip to content

4.0.0 / 2018-03-22

Compare
Choose a tag to compare
@keithamus keithamus released this 22 Mar 13:20
d9a8d1f

This is a major update to the underlying dependencies and also introduces some breaking changes.

  • The biggest breaking change is that this library will _no longer throw based on the status code! This means a request that returns a 404, or 500 or any other status code cannot be asserted on in the catch block, instead must be asserted on in the then block. In other words this behaves more akin to fetch.
  • Another large breaking change is that the chai.request(server) object will automatically close the server connection after the first request. This means if you have code like this:
const request = chai.request(app)

request.get('/bar')
request.get('/bar')

you'll need to change it to:

const request = chai.request(app).keepOpen()

request.get('/bar')
request.get('/bar')

This is described further in the README

Community Contributions

Code Features & Fixes

Documentation fixes