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') expect(object).not.equal('x')
``` ```
### Chai-jQuery ## Chai with jQuery
### Using chai-jquery
```js ```js
global.jQuery = ··· global.jQuery = ···
chai.use(require('chai-jquery')) chai.use(require('chai-jquery'))
``` ```
{: .-setup}
```js ```js
expect($body) expect($body)
@ -160,6 +163,12 @@ expect($body)
.have.value('2013') .have.value('2013')
``` ```
### Continued
```js
expect($body)
```
```js ```js
.be.visible .be.visible
.be.hidden .be.hidden