Throws: `expected` is optional and supports more types than Error

Fixes jquery/api.qunitjs.com#31