Releases: chaijs/chai-http
Releases · chaijs/chai-http
4.0.0 / 2018-03-22
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
, or500
or any other status code cannot be asserted on in thecatch
block, instead must be asserted on in thethen
block. In other words this behaves more akin tofetch
. - 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
- #123 Support responses that have
statusCode
when asserting .status (by @atom-morgan) - #128 Support asserting on cross-domain cookies (by @leggsimon)
- #136 Improve Karma support (by @bartw)
- #149 Drop node 4 support (by @vieiralucas)
- #133 Support cookies within
agent
(by @yashsriv) - #154 Support 307, 308 redirects in
.redirect()
assertion (by @tonymet)
Documentation fixes
- #102 Fix docs regarding Promises (by @keithamus)
- #127 Fix docs formatting for chaijs.com (by @Limess)
- #137 Improve docs around form data (by @ZackWard)
- #138 Add MIT license to package.json (by @noderat)
- #142 Fix semicolons in readme (by @vieiralucas)
- #160 Add examples for
.not.redirect
in readme (by @mcky) - #166 Fix docs for form tests (by @barraponto)
- #167 Add readme docs to make it easier to find out how to login during tests (by @barraponto)
- #173 Clarify using chai expect in Readme (by @cornelius-k)
- #190 Add readme note about agent not closing (by @gswalden)
- #199 Fix license typo in package.json (by @zewa666)
3.0.0 / 2016-06-10
This is a major update to the underlying dependencies; qs
and superagent
It should be noted that these updates may cause breakages on your code. Please check out the superagent release notes and the qs release notes for more.
Community Contributions
Code Features & Fixes
- #73 Create minified and sourcemapped dist files (by @BigstickCarpet)
- #99 Update all dependencies (by @keithamus)
Documentation fixes
- #80 Document asynchronous cavet (by @sambostock)
- #90 Fix documentation typos (by @cjbrambo)
2.0.1 / 2016-02-02
Noting to see here, just a quick clerical release that adds npm keywords
Community Contributions
Code Features & Fixes
Documentation fixes
- #72 Update package.json keywords (by @keithamus)
2.0.0 / 2016-02-01
This release adds browser support, and upgrades SuperAgent to 1.2.x
Community Contributions
Code Features & Fixes
- #24 Inspect res.redirects for redirect assertions (by @hurrymaplelad)
- #22 Accept header names of any case (by @hurrymaplelad)
- #23 Test header values with regular expressions (by @hurrymaplelad)
- #28 Add support for proxy servers via "superagent-proxy" (by @nfreear)
- #35 Superagent to Version 1.0.x (by @pgrm)
- #70 Browser support (by @BigstickCarpet)
- #71 refactor to use npm scripts over makefile (by @keithamus)
Documentation fixes
- #16 Fix documentation to show proper order of testing with HTTP Basic auth (by @GabeMedrash
- #17 Document promise usage without native support (by @Guuz
- #19 correct documentation for .attach() (by @GabeMedrash
- #33 Clarify the usage of query parameters in README (by @pgrm)
- #42 Fix typo in readme (by @studstill)