chai-http
chai-http copied to clipboard
HTTP Response assertions for the Chai Assertion Library.
Versions: chai: 4.3.4 chai-http: 4.3.0 Step to reproduce: ``` it('/favicon.ico should redirect to /', async () => { const response = await chai.request(service) .get('/favicon.ico'); response.redirects[0].should.be.equal(response.request.url); }); ``` Note: @types/chai-http is...
I am currently achieving this by initializing the request then modifying the method before sending. Something like this: ```javascript const request = chai.request(app) .get(url) .set('Authorization', bearerToken); request.method = newMethod; const...
SuperAgent was updated in this PR: https://github.com/chaijs/chai-http/pull/281 But the version of chai-http was not modified along with it. The result is that the npm registries still are using the old...
There are [known issues](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=jQuery) with jQuery versions before [v3.5.0](https://www.npmjs.com/package/jquery/v/3.5.0). This resulted in the flagging of supergent versions prior to [v6.0.0](https://github.com/visionmedia/superagent/releases/tag/v6.0.0), where [a fix](https://github.com/visionmedia/superagent/pull/1582) has been applied. Therefore, this library can...
> const data = require("./test_data"); > const faker = require("faker"); > const chai = require("chai"); > const chaiHttp = require("chai-http"); > const jwtDecode = require("jwt-decode"); > const dayjs = require("dayjs");...
Chai-http version: "4.3.0" I have found this kind of weird behavior in my test case. Let's recreate the scenario I do have 2 classes: API.ts -> which refers to the...
## :rotating_light: The automated release from the `master` branch failed. :rotating_light: I recommend you give this issue a high priority, so other packages depending on you could benefit from your...
I was hoping to make a helper method for assisting with auth, eg. `chai.request(app).get('/users').withAuth()` which would ensure: - a user is dynamically inserted in the db - the user gets...
Hey, I am trying to write tests that involve making requests to hosted servers (via URL ) say(via `agent1` and `agent2`) & local server(`agent3`). I want to fetch cookies from...
If I'm getting JSON or text back from a request I can look at the .body or .text property. But I can't see any way of inspecting the value of...