Ember CLI addon adding support for sinon.js
Clone or download
Latest commit 2b2c948 Nov 10, 2018


Ember Sinon

Greenkeeper badge

Build Status Ember Observer Score Code Climate Codacy Badge

This addon adds support for Sinon to assist in testing your Ember CLI app.


ember install ember-sinon


While in testing mode (i.e. either when visiting /tests or when running ember test), sinon will be available as an import.

import sinon from 'sinon';

test(".runCallback() should run the callback passed", function(assert) {
  var spy = sinon.spy();

  // Default Sinon messages:
  sinon.assert.calledWith(spy, 'foo');

  // Custom messages:
  assert.ok(spy.calledOnce, "the callback should be called once");
  assert.ok(spy.calledWith('foo'), "the callback should be passed 'foo' as an argument");

Integration with testing frameworks

Check out ember-sinon-qunit for integration with Ember-QUnit!



  • git clone git@github.com:csantero/ember-sinon.git
  • cd my-addon
  • npm install


  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.


This project is licensed under the MIT License.