Adding test for emiting jade's error.

And sorry for posting the last PR without running test.