Context blocks

jstest specs are arranged in nested context blocks, much like in RSpec,
Jasmine and other frameworks. Contexts are delimited by describe blocks (you
can use context instead of describe). Within each block you can have
multiple before and after blocks, that describe what to do before and
after each test. The tests themselves are added using the it or should
function.

Properties assigned to the test during a before block are available in the
it block, so you can use before to set up state for the test.

outer before
outer test
outer after
outer before
INNER before
INNER test
INNER after
outer after

Your before and after blocks are run once for every it block in your
tests. before blocks are typically used to create or modify the objects you
want to test, and after blocks are used to reset any global state you may
have changed during the tests, for example to clear out a database.