-
|
Chai was updated to 5th version. How to use it with 5th version of chai? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
|
you will have to do something like this: import {chai as chaiModule} from 'chai';
const chai = chaiModule.use(chaiHttp); |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, but this is not a solution. |
Beta Was this translation helpful? Give feedback.
-
|
import { expect, use } from 'chai';
import { request } from 'chai-http'; |
Beta Was this translation helpful? Give feedback.
-
|
@keithamus It doesn't work: In "node_modules/chai-http/lib/http.js" there is code: |
Beta Was this translation helpful? Give feedback.
-
|
If you follow @43081j's notes and avoid importing request: import {chai as chaiModule} from 'chai';
const chai = chaiModule.use(chaiHttp);
const request = chai.request; |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. then usage: |
Beta Was this translation helpful? Give feedback.
If you follow @43081j's notes and avoid importing request: