【问题标题】:Velocity hangs with no errors when testing meteor app测试流星应用程序时速度挂起没有错误
【发布时间】:2015-01-15 22:49:32
【问题描述】:

我对流星很陌生,所以我只是在编写一个简单的应用程序,但我真的想尽可能地使其成为 TDD(值得一提的是,我也是 Mocha 的新手)。所以我添加了 mike:mochavelocity:core 包并编写了一个超级简单的初始测试,只是为了看看我是否可以让事情正常工作,我已经在 tests/mocha/client/tests.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 只是挂起(一个蓝色圆圈,周围有一个更宽的蓝色环 - 没有绿色或红色),脉动并且不提供任何反馈。开发者控制台或终端上也没有!我尝试检查 localhost:5000 但这返回为“不可用”。

不知道如何开始解决这个问题!

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

【问题讨论】:

    标签: meteor meteor-velocity


    【解决方案1】:

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

    您可以检查以下几项,但我将展示我的机器上的内容以进行比较:

    • 检查您的节点版本

      node -v

      v0.10.35

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

      brew update && brew upgrade node

      如果您没有 Mac,您可能需要在 Google 上搜索您机器平台的升级说明。

    • 检查您的软件包版本

      meteor list

      流星平台 1.2.1

      迈克:摩卡 0.5.1

      速度:核心 0.4.5

    • 检查你的流星版本

      meteor --version

      流星 1.0.2.1

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

      meteor update

    如果这些都没有帮助,请发布更多信息。此外,您还可以在 Github 上为 Velocity 创建问题。

    【讨论】:

    • 万岁!谢谢,我不得不专门强制 mike:mocha 包使用meteor add mike:mocha@0.5.1 更新到您上面提到的版本,它被卡在 0.4.4
    • 太棒了!很高兴听到它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-17
    • 1970-01-01
    • 2021-01-25
    • 2015-01-02
    • 2013-02-06
    • 1970-01-01
    相关资源
    最近更新 更多