Add extends attributes for several types

Part of #670
This commit is contained in:
Andrew Chin
2018-08-08 22:49:06 -04:00
parent 505037ffae
commit cc8095d065
14 changed files with 118 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use wasm_bindgen::JsValue;
use wasm_bindgen_test::*;
use wasm_bindgen::JsCast;
use js_sys::*;
#[wasm_bindgen_test]
@ -406,3 +407,10 @@ fn value_of() {
let date = Date::new(&Date::utc(2018f64, 6f64).into());
assert_eq!(date.value_of(), 1530403200000.0);
}
#[wasm_bindgen_test]
fn date_inheritance() {
let date = Date::new(&"August 19, 1975 23:15:30".into());
assert!(date.is_instance_of::<Date>());
assert!(date.is_instance_of::<Object>());
}