Chimpjs 和 Meteor:在不使用 Velocity 的情况下在测试中调用方法

Chimpjs and Meteor: method calls in tests without using Velocity

此应用展示了使用 Cucumber 测试 Meteor 的示例: https://github.com/mhurwi/cucumber-meteor-tutorial

它与 Velocity 搭配使用效果很好。但是在使用 Velocity 启动应用程序时我的计算机变得非常慢,我不希望它在我开发时总是 运行。所以我尝试通过使用

将 Chimp 用作 NPM 模块
chimp --ddp=http://localhost:3000

这里提议: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber

但是带有方法调用的测试(方法在 tests/cucumber/fixtures/ 中)不起作用:

Error: Method not found [404]

有人知道我应该怎么做才能使用命令行而不是 Velocity 运行 Cucumber 测试吗?

感谢您的帮助。

另一个小问题:第一次启动 Velocity 是否需要很长时间(我只进行了几次测试,它几乎让我的计算机死机)还是每次都一样?

当运行 Chimp 对抗Meteor 时,你不能在tests/cucumber/fixtures 中放置fixtures,你必须使用fixture package pattern,见这里:

https://meteor-testing.readme.io/docs/data-fixtures

然后您可以使用步骤 defs

中的 server.call('xxx') 调用灯具