Take this code from my unit tests for example:

Create a suite, or collection of specs, using the describe function:

The real spec is created by the IT function, where expectable is the Human readable string description of what the spec is testing, and Assertion is the specific code containing the unit test.

Env. Expect:

Create a expectation using the Spec expectationFactory:

The spec variable contains the expectation of passed implementation and the expectation of failed implementation:

More of Jerry’s original articles can be found in “Wang Zixi” :