mirror of
https://github.com/chaijs/chai
synced 2024-11-15 00:07:11 +00:00
Update Readme for the usage of auto registered chai styles
This commit is contained in:
parent
81283fe539
commit
01f76b8307
1 changed files with 22 additions and 0 deletions
22
README.md
22
README.md
|
@ -116,6 +116,28 @@ var expect = chai.expect;
|
|||
var should = chai.should();
|
||||
```
|
||||
|
||||
## Usage for ES6+
|
||||
|
||||
```js
|
||||
// Using Assert style
|
||||
import assert from 'chai/assert'
|
||||
// Using Expect style
|
||||
import expect from 'chai/expect'
|
||||
// Using Should style
|
||||
import should from 'chai/should'
|
||||
```
|
||||
|
||||
## Usage with Mocha
|
||||
|
||||
```bash
|
||||
# Using Assert style
|
||||
mocha spec.js -r chai/assert # OR:
|
||||
# Using Expect style
|
||||
mocha spec.js -r chai/expect # OR:
|
||||
# Using Should style
|
||||
mocha spec.js -r chai/should
|
||||
```
|
||||
|
||||
[Read more about these styles in our docs](http://chaijs.com/guide/styles/).
|
||||
|
||||
## Plugins
|
||||
|
|
Loading…
Reference in a new issue