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:
现有JavaScript测试框架存在诸多不足,如只能在浏览器中运行、不支持异步代码测试、语法难理解等。因此开发了Jasmine,它受多个框架影响,设计遵循不依赖特定环境、语法自然等原则,目标是鼓励良好测试实践、易与持续构建系统集成等。

被折叠的 条评论
为什么被折叠?



