Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

merged 6 commits into from Nov 17, 2016
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -116,6 +116,28 @@ var expect = chai.expect;
var should = chai.should();

## Native Modules Usage

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

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](

## Plugins
@@ -0,0 +1 @@
global.assert = module.exports = require('./').assert;
@@ -0,0 +1 @@
global.expect = module.exports = require('./').expect;
@@ -1 +1 @@
module.exports = require('./').should();
global.should = module.exports = require('./').should();