Skip to content

Commit

Permalink
Fix #326 - readme: add how to import chai 5 and use chaiHttp 4 (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
boly38 authored May 21, 2024
1 parent e30a5b8 commit 62f521c
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 62f521c

Please sign in to comment.