wasm-bindgen/crates/js-sys/tests/wasm/Promise.rs

12 lines
304 B
Rust
Raw Normal View History

2018-08-24 02:25:43 +03:00
use js_sys::*;
use wasm_bindgen::JsCast;
use wasm_bindgen_test::*;
2018-08-24 02:25:43 +03:00
#[wasm_bindgen_test]
fn promise_inheritance() {
let promise = Promise::new(&mut |_, _| ());
assert!(promise.is_instance_of::<Promise>());
assert!(promise.is_instance_of::<Object>());
let _: &Object = promise.as_ref();
}