测试流星应用程序时 Velocity 挂起且没有错误

Velocity hangs with no errors when testing meteor app

我是 meteor 的新手,所以我只是在编写一个简单的应用程序,但我真的想尽可能地让它成为 TDD(值得一提的是,我也是 Mocha 的新手)。所以我添加了 mike:mochavelocity:core 包并编写了一个超级简单的初始测试只是为了看看我是否能让事情正常工作,我在 [=29 添加了=].js:

if (typeof MochaWeb != 'undefined') {
 MochaWeb.testOnly(function () {

   describe('Friends are added successfully', function () {

     it('Should add a new person to the Friend collection', function(done) {
       var friendId = Friends.insert(
           { firstName: 'New',
           lastName: 'Friend'});

       var friend = Friends.findOne({'firstName':'New'});
       console.log(friend);
       chai.assert.equal(friend.length === 1);
       done();
     });
   });
  })
;}

我的问题是,当我 运行 使用 meteor 命令或 meteor --test 时,除了预期的结果外,我在终端中什么也得不到:

=> Started proxy.                             
=> Started MongoDB.I20150115-22:31:03.216(0)? [velocity] chokadir watching /correctDirectory/tests
=> Started your app.

=> App running at: http://localhost:3000/

但是 Velocity 只是挂起(一个蓝色圆圈周围有一个更宽的蓝色环 - 没有绿色或红色),脉动并且不提供任何反馈。 None 在开发者控制台或终端上!我尝试检查 localhost:5000,但结果显示为 'not available'。

不确定如何开始解决这个问题!

提前感谢任何可以提供帮助的人:)

我能够让您的示例在我的本地运行,因此我建议您先检查您的软件版本并使其符合要求。

这里有一些你可以检查的东西,但我会展示我的 machine 上的内容以供比较:

  • 检查你的node版本

    node -v

    v0.10.35

  • 如有必要,升级节点。在我的 mac 上,我执行以下操作:

    brew update && brew upgrade node

    如果您没有 mac,您可能需要 google 获取 machine 平台的升级说明。

  • 检查你的包版本

    meteor list

    流星平台 1.2.1

    麦克:摩卡 0.5.1

    速度:核心 0.4.5

  • 检查你的流星版本

    meteor --version

    流星 1.0.2.1

  • 如有需要,升级meteor及相关包

    meteor update

如果 none 有帮助,请 post 补充信息。此外,您还可以在 Github 上为 Velocity.

创建问题