Name: ember-sinon
Owner: simplabs
Description: Ember CLI addon adding support for sinon.js
Created: 2015-05-20 19:13:00.0
Updated: 2015-05-20 19:13:01.0
Pushed: 2015-05-20 19:49:38.0
Homepage: null
Size: 97
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This addon adds support for Sinon to assist in testing your Ember CLI app.
If you are using Ember CLI 0.1.5 or higher:
r install:addon ember-sinon
otherwise:
install --save-dev ember-sinon
r g ember-sinon
While in testing mode (i.e. either when visiting /tests
or when running ember test
), sinon
will be available in the global namespace. You can use it normally:
(".runCallback() should run the callback passed", function(assert) {
r spy = sinon.spy();
is.subject().runCallback(spy);
sert.ok(spy.calledOnce, "the callback should be called once");
sert.ok(spy.calledWith('foo'), "the callback should be passed 'foo' as an argument");