JavaScript BDD:誓言和承诺久里VS。茉莉花
I was going to go with Vows and Kyuri, but then I found out about Jasmine. Which do you recommend? Vows or Jasmine? Is there a Cucumber implementation that works with Jasmine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Jasmine
优点:
缺点:
Vows
构建的优点:
缺点:
我更喜欢用 Vows 来测试 NodeJS 应用程序,用 Jasmine 来测试客户端代码。一旦你习惯了 CoffeeScript,誓言就会变得非常干净和强大。
Jasmine
Pros :
Cons :
Vows
Pros :
Cons :
I would prefer Vows for testing NodeJS applications and Jasmine for client side code. Once you get used to CoffeeScript, vows becomes really clean and powerful.
我认为值得注意的是,Kyuri 并没有真正做与 Cucumber 相同的事情。其实只是小黄瓜而已。您可以在顶部实现该功能,但它并不是开箱即用的。
就我个人而言,我正在使用誓言。这有点费脑子,但它相对简单,并且语法更适合我非常喜欢的 CoffeeScript。另外,我真的不想让 Ruby 参与我的构建过程,尽管您的情况可能会有所不同,并且我保留改变想法的权利。
I think it's important to note that Kyuri doesn't really do the same thing as Cucumber. It's actually just the gherkin bit. You could implement the functionality on top, but it's not coming out of the box.
Personally, I'm using vows. It's a bit brain-bending, but it's relatively simple and has a syntax which works better with CoffeeScript, which I'm very fond of. Also, I don't really want to involve Ruby in my build process, although your mileage may vary and I reserve the right to change my mind about that one.
我认为jasmine更适合javascript中的单元测试。非常简单且功能强大,非常容易获得它,并且与其他工具(例如 rake 或 Rails)很好地集成。
I think jasmine is more suitable for unit testing in javascript. Is really simple and powerful, quite straightforward to get it and integrates nice with other tools such as rake or rails.