substack/tape — pull request #60 by braddunbar (2014-02-01 15:35:13+00:00)
Title: Reduce stack size.

When running synchronous tests, each test currently increases the stack size by several frames. When debugging the 100th test, the stack is several hundred frames deep. This makes things difficult to debug as tools often choke on stacks of this size.

This patch runs synchronous tests in a loop instead of running each successive test in the previous tests `end` event handler. Further, asynchronous tests resume processing on the next tick, removing the previous tests call stack before running the next one.