Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

[Doppins] Upgrade dependency chai-http to ^4.0.0 #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doppins-bot
Copy link
Contributor

Hi!

A new version was just released of chai-http, so Doppins
has upgraded your project's dependency ranges.

Make sure that it doesn't break anything, and happy merging! :shipit:


Upgraded chai-http from ^3.0.0 to ^4.0.0

Changelog:

Version 4.0.0

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 (https://github.com/chaijs/chai-http/tree/4.0.0)

Community Contributions

Code Features & Fixes

  • #123 (https://github.com/chaijs/chai-http/pull/123) Support responses that have statusCode when asserting .status (by @atom-morgan)
  • #128 (https://github.com/chaijs/chai-http/pull/128) Support asserting on cross-domain cookies (by @leggsimon)
  • #136 (https://github.com/chaijs/chai-http/pull/136) Improve Karma support (by @bartw)
  • #149 (https://github.com/chaijs/chai-http/issue/149) Drop node 4 support (by @vieiralucas)
  • #133 (https://github.com/chaijs/chai-http/issue/133) Support cookies within agent (by @yashsriv)
  • #154 Support 307, 308 redirects in .redirect() assertion (by @tonymet)

Documentation fixes

  • #102 (https://github.com/chaijs/chai-http/pull/102) Fix docs regarding Promises (by @keithamus)
  • #127 (https://github.com/chaijs/chai-http/pull/127) Fix docs formatting for chaijs.com (by @Limess)
  • #137 (https://github.com/chaijs/chai-http/pull/137) Improve docs around form data (by @ZackWard)
  • #138 (https://github.com/chaijs/chai-http/pull/138) Add MIT license to package.json (by @noderat)
  • #142 (https://github.com/chaijs/chai-http/pull/142) Fix semicolons in readme (by @vieiralucas)
  • #160 (https://github.com/chaijs/chai-http/issue/160) Add examples for .not.redirect in readme (by @mcky)
  • #166 (https://github.com/chaijs/chai-http/issue/166) Fix docs for form tests (by @barraponto)
  • #167 (https://github.com/chaijs/chai-http/issue/167) Add readme docs to make it easier to find out how to login during tests (by @barraponto)
  • #173 (https://github.com/chaijs/chai-http/issue/173) Clarify using chai expect in Readme (by @cornelius-k)
  • #190 (https://github.com/chaijs/chai-http/issue/190) Add readme note about agent not closing (by @gswalden)
  • #199 (https://github.com/chaijs/chai-http/issue/199) Fix license typo in package.json (by @zewa666)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant