Skip to content

Commit

Permalink
Update chai_http.md
Browse files Browse the repository at this point in the history
add a new sample on how to use chai-http with `import`

thanks to @MIrinkov via [his comment](DefinitelyTyped/DefinitelyTyped#19480 (comment))

This is part of chaijs#205
  • Loading branch information
boly38 authored May 19, 2024
1 parent 9f52c6b commit 5a5bcc1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/chai_http.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ var chai = require('chai')
chai.use(chaiHttp);
```

To use Chai HTTP with import
```js
import * as chai from 'chai';
import chaiHttp from 'chai-http';
chai.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 5a5bcc1

Please sign in to comment.