I am using mocha and below piece of test timeouts, any idea why?
beforeEach(function(done) {
this.timeout(4800000);
console.log('running npm install; bower install on fixtures');
exec('npm install; bower install', { cwd: path.join(__dirname, 'fixtures') },
function(error) {
if (error) { console.log('Error: ' + error); }
done();
console.log('npm done');
});
});
});
it('should pass jshint', function(done) {
this.timeout(24000);
exec('gulp jshint', function(error, stdout, stderr) {
if (error) { console.log('Error: ' + error); }
expect(stdout).to.contain('Finished \'jshint\'');
expect(stdout).to.not.contain('problems');
done();
});
});
But if i remove beforeEach, it works fine. If i have the beforeEach it doesn't hang on beforeEach (npm done is logged), but hands on exec('gulp jshint'). Any idea how beforeEach could effect that?
If i do gulp jshint manually it runs quickly under 2 seconds.
$ gulp jshint
[12:00:44] Using gulpfile ~/website/test/.tmp/gulpfile.js
[12:00:44] Starting 'jshint'...
[12:00:44] Finished 'jshint' after 457 ms
Actually the project is here generator-emberfs if you want to try, it's under test/test-creation.js.