2013-05-19 90 views
0

我的测试运行在我的OS X环境很好,但是当我在我的Ubuntu运行它们(EC2)服务器,测试失败:compoundjs摩卡测试失败Ubuntu的服务器上

✖ 1 of 40 tests failed: 
1) AccountController "before each" hook: 
Error: done() invoked with non-Error: [object Object] 
    at CompoundServer.<anonymous> (/usr/lib/node_modules/mocha/lib/runnable.js:198:38) 
    at CompoundServer.EventEmitter.emit (events.js:95:17) 
    at CompoundServer.initCompound (/home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/compound.js:133:14) 
    at CompoundServer.initCompoundServer [as init] (/home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/server/compound.js:53:29) 
    at /home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/compound.js:62:18 
    at process._tickCallback (node.js:415:13) 

我做的正在运行摩卡测试/ *。这可能是由于compoundjs或node.js的差异造成的吗?在我工作的Mac上,我在v0.8.22上,在ubuntu服务器上它是v0.10.5。同样在ubuntu上的复合版本是1.1.7-1,而在mac(working)上是1.1.6。

+0

看起来像一个版本问题与compoundjs。升级到我的Mac上的复合1.1.7-1,现在有相同的问题。我是否需要重新生成控制器...等等?或者有没有可以添加到测试中的修复程序? – Michael

回答

0

看起来像是应用程序由以前版本的化合物生成的问题。我生成的测试

compound.on('ready', done); 

更改该行

compound.on('ready', function() { 
     done(); 
    }); 

解决了这一问题。