Fix a problem with a hanging tests.

This fixes a problem with the tests hanging when using the node runner.  I also added an additional test case and changed some of the syntax to avoid a jshint warning about confusing use of "!!".