[Jasmine]Why Another JavaScript TDD/BDD Framework?

There are some great JavaScript testing frameworks out there already, so why did we write another?

None of the existing frameworks quite worked the way we wanted. Many only work from within a browser. Most don't support testing asynchronous code like event callbacks. Some have syntax that's hard for JS developers or IDEs to understand.

So we decided to start from scratch.

Enter Jasmine

Jasmine is our dream JavaScript testing framework. It's heavily influenced by, and borrows the best parts of, ScrewUnit, JSSpec, JSpec, and of course RSpec.

Jasmine was designed with a few principles in mind. We believe that a good JavaScript testing framework:

  • should not be tied to any browser, framework, platform, or host language.
  • should have idiomatic and unsurprising syntax.
  • should work anywhere JavaScript can run, including browsers, servers, phones, etc.
  • shouldn't intrude in your application's territory (e.g. by cluttering the global namespace).
  • should play well with IDEs (e.g. test code should pass static analysis).

Some of our goals while writing Jasmine:

  • it should encourage good testing practices.
  • it should integrate easily with continuous build systems.
  • it should be simple to get started with.

The result is Jasmine, and we love test-driving our code with it. Enjoy.

 HomePage:

http://pivotal.github.com/jasmine/

 

Reference:

https://github.com/pivotal/jasmine/wiki

 

External Reference:

http://code.google.com/p/js-test-driver/wiki/GettingStarted

转载于:https://www.cnblogs.com/jalenwang/archive/2012/02/29/2373964.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值