mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 04:51:23 +00:00
Js sys once over (#550)
* js-sys: Return `f64` instead of `Number` * js-sys: remove trailing whitespace * js-sys: Ensure that all imported types derive Clone and Debug * js-sys: Imported functions should always take JS object arguments by-ref
This commit is contained in:
committed by
Alex Crichton
parent
93933f033f
commit
61fc8d2567
@ -4,10 +4,10 @@ use js_sys::*;
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn new_undefined() {
|
||||
assert_eq!(Boolean::new(JsValue::undefined()).value_of(), false);
|
||||
assert_eq!(Boolean::new(&JsValue::undefined()).value_of(), false);
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn new_truely() {
|
||||
assert_eq!(Boolean::new(JsValue::from("foo")).value_of(), true);
|
||||
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user