You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As chai end user, and for a Node ESM project, I install chai (5.1.1) and chai-http (4.4.0) in latest version and I'm alsways asking myself on how to do chai import statement. So I need to rely on up-to-date online chai/chai-http doc
ESM guide : improve provided sample ? I didn't success to import request and use it directly. My side I'm using chai.request(app) as agent then agent.request..
The text was updated successfully, but these errors were encountered:
boly38
added a commit
to boly38/chai-http
that referenced
this issue
May 20, 2024
As chai end user, and for a Node ESM project, I install chai (5.1.1) and chai-http (4.4.0) in latest version and I'm alsways asking myself on how to do chai import statement. So I need to rely on up-to-date online chai/chai-http doc
Doc first result : https://www.chaijs.com/plugins/chai-http/
Doc ESM how to guide : https://www.chaijs.com/guide/using-chai-with-esm-and-plugins/
-> 🔴 provided example is not working (at least for me) :
import { request }, chaiHttp from 'chai-http';
My first PR (rejected because wrong repo) : Update chai_http.md - add how to use chai-http with import - issue #205 chaijs.github.io#211
-> Correct repository is here: https://github.com/chaijs/chai-http/blob/main/README.md
Chai-http related issue : #313
=>related discussion - working answer #315 (comment)
working sample
TODO:
request
and use it directly. My side I'm using chai.request(app) as agent then agent.request..The text was updated successfully, but these errors were encountered: