improved test for throwing errors. Thanks @svnlot

* * *

This commit was sponsored by Human JavaScript.
Human JavaScript is the best way to learn modern
web application development today, read it now:

http://go.hood.ie/human-javascript