Skip to content

Commit 5a5bcc1

Browse files
authored
Update chai_http.md
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 #205
1 parent 9f52c6b commit 5a5bcc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: plugins/chai_http.md

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ var chai = require('chai')
3232
chai.use(chaiHttp);
3333
```
3434

35+
To use Chai HTTP with import
36+
```js
37+
import * as chai from 'chai';
38+
import chaiHttp from 'chai-http';
39+
chai.use(chaiHttp);
40+
```
41+
42+
3543
To use Chai HTTP on a web page, just include the [`dist/chai-http.js`](dist/chai-http.js) file:
3644

3745
```html

0 commit comments

Comments
 (0)