【问题标题】:compoundjs mocha tests failing on ubuntu serverCompoundjs mocha 测试在 ubuntu 服务器上失败
【发布时间】:2013-05-19 21:32:07
【问题描述】:

我的测试在我的 OS X 环境中运行良好,但是当我在我的 ubuntu (EC2) 服务器上运行它们时,测试失败:

✖ 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)

我所做的只是运行 mocha test/*.这可能是由 Compoundjs 或 node.js 的差异引起的吗?在我工作的mac上,我在v0.8.22上,在ubuntu服务器上它是v0.10.5。同样,在 ubuntu 上的复合版本是 1.1.7-1,而在 mac(工作)上是 1.1.6。

【问题讨论】:

  • 看起来像是 Compoundjs 的版本问题。在我的 Mac 上升级到复合 1.1.7-1,现在遇到了同样的问题。我需要重新生成控制器...等吗?或者有什么我可以添加到测试中的修复?

标签: node.js mocha.js compoundjs


【解决方案1】:

看起来该应用是由以前版本的 Compound 生成的问题。在我生成的测试中更改这一行

compound.on('ready', done);

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

解决了问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多