Created
March 1, 2016 02:34
-
-
Save john-kurkowski/da3abb95329f14f19c19 to your computer and use it in GitHub Desktop.
My answer to "How to test Ember error substate, with Ember CLI test runner?" http://stackoverflow.com/q/34074386/62269
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import moduleForAcceptance from '../helpers/module-for-acceptance'; | |
import sinon from 'sinon'; | |
const { Test } = Ember; | |
moduleForAcceptance('Acceptance | error', { | |
beforeEach() { | |
this.sandbox = sinon.sandbox.create(); | |
// Override Ember.Test's default failure on uncaught errors. See http://stackoverflow.com/a/34138273/62269 | |
this.sandbox.stub(Test.adapter, 'exception'); | |
}, | |
afterEach() { | |
this.sandbox.restore(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment