mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-17 14:31:45 +03:00
c8d0c57990
Part of #670
16 lines
409 B
Rust
16 lines
409 B
Rust
use wasm_bindgen::JsValue;
|
|
use wasm_bindgen_test::*;
|
|
use wasm_bindgen::JsCast;
|
|
use js_sys::*;
|
|
|
|
#[wasm_bindgen_test]
|
|
fn uri_error() {
|
|
let error = UriError::new("msg");
|
|
assert!(error.is_instance_of::<UriError>());
|
|
assert!(error.is_instance_of::<Error>());
|
|
assert!(error.is_instance_of::<Object>());
|
|
|
|
let base: &Error = error.as_ref();
|
|
assert_eq!(JsValue::from(base.message()), "msg");
|
|
}
|