summaryrefslogtreecommitdiffstats
path: root/vendor/js-sys/tests/wasm/Promise.rs
blob: 5502a615612c83966b369f23b2ec4843dc40c932 (plain)
1
2
3
4
5
6
7
8
9
10
11
use js_sys::*;
use wasm_bindgen::JsCast;
use wasm_bindgen_test::*;

#[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();
}