Check that all errors are instances of Object

Part of #670
This commit is contained in:
Matt Kraai
2018-08-16 04:49:10 -07:00
parent f8354b3a88
commit c8d0c57990
5 changed files with 5 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ fn range_error() {
let error = RangeError::new("out of range yo");
assert!(error.is_instance_of::<RangeError>());
assert!(error.is_instance_of::<Error>());
assert!(error.is_instance_of::<Object>());
let base: &Error = error.as_ref();
assert_eq!(JsValue::from(base.message()), "out of range yo");