Add script that registers expect as a side-effect #868

Merged
merged 6 commits into from Nov 17, 2016
View
@@ -116,6 +116,28 @@ var expect = chai.expect;
var should = chai.should();
```
+## Native Modules Usage
+
+```js
+import assert from 'chai/assert'
+// Using Assert style
+import expect from 'chai/expect'
+// Using Expect style
+import should from 'chai/should'
+// Using Should style
+```
+
+## Usage with Mocha
+
+```bash
+mocha spec.js -r chai/assert # OR:
+# Using Assert style
+mocha spec.js -r chai/expect # OR:
+# Using Expect style
+mocha spec.js -r chai/should
+# Using Should style
+```
+
[Read more about these styles in our docs](http://chaijs.com/guide/styles/).
## Plugins
View
@@ -0,0 +1 @@
+global.assert = module.exports = require('./').assert;
View
@@ -0,0 +1 @@
+global.expect = module.exports = require('./').expect;
View
@@ -1 +1 @@
-module.exports = require('./').should();
+global.should = module.exports = require('./').should();