cloudhead/vows — pull request #185 by jmreidy (2012-01-23 01:18:07+00:00)
Title: Topic error passed to cb

I noticed when performing callback-style tests with Vows and Zombie that errors that occurred midway through the test sequence (e.g. clicking a nonexistent button) weren't being caught in my assertions. Instead, the value argument passed to my Vows assertions were the Error objects being thrown by Zombie.

It turns out that Vows swallows topic Errors and passes them down as values; this behavior is confusing for callback-style tests, as the error argument comes through as `null` but the value argument is the error.

The change I'm introducing adjusts that behavior to make sure that callback-style tests receive the Error in the expected argument position. I've added a test as well.