Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
17
third-party/vendor/js-sys/tests/wasm/SyntaxError.rs
vendored
Normal file
17
third-party/vendor/js-sys/tests/wasm/SyntaxError.rs
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use js_sys::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use wasm_bindgen::JsValue;
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn syntax_error() {
|
||||
let error = SyntaxError::new("msg");
|
||||
assert!(error.is_instance_of::<SyntaxError>());
|
||||
assert!(error.is_instance_of::<Error>());
|
||||
assert!(error.is_instance_of::<Object>());
|
||||
let _: &Error = error.as_ref();
|
||||
let _: &Object = error.as_ref();
|
||||
|
||||
let base: &Error = error.as_ref();
|
||||
assert_eq!(JsValue::from(base.message()), "msg");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue