chai: formatting

This commit is contained in:
Rico Sta. Cruz 2017-08-30 21:57:25 +08:00
parent c442907f1a
commit 466f1c07fb
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 10 additions and 1 deletions

11
chai.md
View File

@ -133,12 +133,15 @@ These don't do anything and can be chained.
expect(object).not.equal('x')
```
### Chai-jQuery
## Chai with jQuery
### Using chai-jquery
```js
global.jQuery = ···
chai.use(require('chai-jquery'))
```
{: .-setup}
```js
expect($body)
@ -160,6 +163,12 @@ expect($body)
.have.value('2013')
```
### Continued
```js
expect($body)
```
```js
.be.visible
.be.hidden