From e9e707268746f93e2cc74e9b379565baa6a83350 Mon Sep 17 00:00:00 2001 From: sepiropht Date: Thu, 9 Aug 2018 14:33:59 +0200 Subject: [PATCH] [670] add extends for Array type --- crates/js-sys/tests/wasm/Array.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/js-sys/tests/wasm/Array.rs b/crates/js-sys/tests/wasm/Array.rs index 9525a913..d6c38954 100644 --- a/crates/js-sys/tests/wasm/Array.rs +++ b/crates/js-sys/tests/wasm/Array.rs @@ -1,5 +1,6 @@ use wasm_bindgen::JsValue; use wasm_bindgen_test::*; +use wasm_bindgen::JsCast; use js_sys::*; macro_rules! js_array { @@ -286,3 +287,9 @@ fn for_each() { assert_eq!(sum_indices_of_evens(&js_array![1, 3, 5, 7]), 0); assert_eq!(sum_indices_of_evens(&js_array![3, 5, 7, 10]), 3); } +#[wasm_bindgen_test] +fn array_inheritance() { + let array = Array::new(); + assert!(array.is_instance_of::()); + assert!(array.is_instance_of::()); +}