mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 04:51:23 +00:00
@ -1,5 +1,6 @@
|
||||
use wasm_bindgen::JsValue;
|
||||
use wasm_bindgen_test::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use js_sys::*;
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
@ -11,3 +12,10 @@ fn new_undefined() {
|
||||
fn new_truely() {
|
||||
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn boolean_inheritance() {
|
||||
let b = Boolean::new(&JsValue::from(true));
|
||||
assert!(b.is_instance_of::<Boolean>());
|
||||
assert!(b.is_instance_of::<Object>());
|
||||
}
|
||||
|
Reference in New Issue
Block a user