google js test—谷歌开源JS单元测试工具

On 2011年10月6日, in soft, by netoearth

Google JS Test is a fast javascript unit testing framework that runs on the V8 engine, without needing to launch a full browser. Features include:

  • Extremely fast test startup and execution time, without having to run a browser.
  • Clean, readable output in the case of both passing and failing tests.
  • A browser-based test runner that can simply be refreshed whenever JS is changed.
  • Style and semantics that resemble Google Test for C++.
  • A built-in mocking framework that requires minimal boilerplate code (e.g. no $tearDown or $verifyAll) with style and semantics based on the Google C++ Mocking Framework.

The trade-off is that since tests are run in V8 without a browser, there is no DOM available. You can still use Google JS Test for tests of DOM-manipulating code however; see “Is it for me?” for more details.


Version 1.0.5 release.

Major changes since 1.0.4:

*   Fixed a build error on some configurations of Linux (issue 7).
*   Added a `doAll` action.
SHA1 Checksum: 0314b4ed97ac19be7637c3e2735a81eb4a30e66e What’s this?

Comments are closed.