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 chai and mocha ES6 shims. #23

Merged
merged 2 commits into from
Feb 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/chai.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* globals chai */

export var expect = chai.expect;
export var assert = chai.assert;
11 changes: 11 additions & 0 deletions lib/mocha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* globals mocha, describe, it */

export {
mocha,
describe,
it,
before,
beforeEach,
after,
afterEach
};
16 changes: 16 additions & 0 deletions tests/shims-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { describe, it } from 'mocha';
import { expect, assert } from 'chai';

describe('mocha-shim', function() {
it('should work', function() {
window.expect(describe).to.equal(window.describe);
window.expect(it).to.equal(window.it);
});
});

describe('chai-shim', function() {
it('should work', function() {
window.expect(expect).to.equal(window.chai.expect);
window.expect(assert).to.equal(window.chai.assert);
});
});