如何为 Meteor 的黄瓜速度创建客户端装置?

How to create client side fixtures for cucumber velocity for Meteor?

在 cucumber for velocity 网站的示例中,展示了如何创建夹具代码,但该代码似乎 运行 在服务器上。 您如何创建客户端夹具代码? 我想用存根替换 Date 对象。

创建一个包含 meteor 方法的客户端文件的 debugOnly 程序包,然后仅使用 client.execute() 在客户端调用该方法。也就是说,您可以在

client.execute(function() {
  Date = {
    now: function() {return 'someDate'}
  };
});