mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 01:31:34 +00:00
feat(extends): extend promise
This commit is contained in:
11
crates/js-sys/tests/wasm/Promise.rs
Normal file
11
crates/js-sys/tests/wasm/Promise.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use wasm_bindgen_test::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use js_sys::*;
|
||||
|
||||
#[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();
|
||||
}
|
@ -26,6 +26,7 @@ pub mod MapIterator;
|
||||
pub mod Math;
|
||||
pub mod Number;
|
||||
pub mod Object;
|
||||
pub mod Promise;
|
||||
pub mod Proxy;
|
||||
pub mod RangeError;
|
||||
pub mod ReferenceError;
|
||||
|
Reference in New Issue
Block a user