File a separate ticket with any info you have. We might have to remove and
for test libs

On Friday, November 15, 2013, Erik Trom wrote:

> In app/templates/seed/test/test-setup-all.js:
>
> > +
> > +  // https://github.com/domenic/sinon-chai/blob/master/test/throwing.coffee
> > +  global.swallow = function (thrower) {
> > +    try {
> > +      thrower();
> > +    } catch (e) { }
> > +  };
> > +
> > +  var sinonChai = require("sinon-chai");
> > +  chai.use(sinonChai);
> > +
> > +  // Sinon + Require = time sucker, be careful, require locally
> > +  require("sinon");
> > +  // TODO: throws error, likey something async, 1 in 20 times
> > +  // require("sinon/stub");
> > +
>
> in an ideal world enabling sinon/stub should work, but doing so will
> create a failure in test/app.spec.js 1/20 times, sinon.stub undefined.
> view commented out line in that file to see what i mean. I am either doing
> something wrong with the async require(everywhere!!!!) or sinon is doing it
> wrong when they assign to module.exports, check
> ../bower_components/sinon/lib/sinon.js line 331. It seems like this should
> be enabled by default. Of course manually requiring it at the top of a test
> file does provide the same error(although i can't remember if that's true
> or not to be honest)
>
> in general this is the only indeterminate requirejs failure that i'm still
> experiencing with async module loading. seriously wondering why it happens.
> think i got everything else right, someone should review though
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/walmartlabs/generator-thorax/pull/62/files#r7708704>
> .
>