honestly, i don’t know.  we’ve only just started using Ember recently and the basic pattern i adapted for this was from using mocha directly.   i had been planning on removing that guard once we saw that our tests were running stably to see if it was really necessary.


On Apr 11, 2014, at 1:06 AM, Vojta Jina <notifications@github.com> wrote:

> In docs/plus/08-emberjs.md:
> 
> > @@ -58,6 +58,25 @@ To execute javascript unit and integration tests with ember.js follow the steps
> >  
> >    Note - the `files` section above should include all dependencies, ie- jQuery/handlebars/ember.js along with the js and handlebars files required to deploy and run your production ember.js application
> >  
> > +  Note - when testing ember applications, it is important that karma not being running the tests until the ember application has finished initialization.  you will need to include a small bootstrap file in the `files` section about to enforce this.  Here's an example:
> > +  ```javascript
> > +  __karma__.loaded = function() {};
> > +
> > +  App.setupForTesting();
> > +  App.injectTestHelpers();
> > +
> > +  var karma_started = false;
> > +  App.initializer({
> > +      name: "run tests",
> > +      initialize: function(container, application) {
> > +          if (!karma_started) {
> Does Ember calls initialize multiple times?
> 
> —
> Reply to this email directly or view it on GitHub.
>