Skip to content

Commit

Permalink
Fix chaijs#326 - readme: add how to import chai 5 and use chaiHttp 4
Browse files Browse the repository at this point in the history
  • Loading branch information
boly38 committed May 20, 2024
1 parent e30a5b8 commit cb2a8b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ const chaiHttp = require('chai-http');
chai.use(chaiHttp);
```

To use Chai HTTP in an ECMAScript module (ESM)

```js
import chaiHttp from "chai-http";
import * as chaiModule from 'chai';
const chai = chaiModule.use(chaiHttp);
```

To use Chai HTTP on a web page, just include the [`dist/chai-http.js`](dist/chai-http.js) file:

```html
Expand Down

0 comments on commit cb2a8b2

Please sign in to comment.