Port MapIterator tests to wasm

This commit is contained in:
Alex Crichton
2018-07-20 13:57:18 -07:00
parent 2c9a606c3d
commit 230f923fdb
4 changed files with 24 additions and 101 deletions

View File

@ -0,0 +1,23 @@
use wasm_bindgen::JsValue;
use wasm_bindgen_test::*;
use js_sys::*;
// TODO: not much you can do with `MapIterator` types yet :(
#[wasm_bindgen_test]
fn entries() {
let map = Map::new();
assert!(JsValue::from(map.entries()).is_object());
}
#[wasm_bindgen_test]
fn keys() {
let map = Map::new();
assert!(JsValue::from(map.keys()).is_object());
}
#[wasm_bindgen_test]
fn values() {
let map = Map::new();
assert!(JsValue::from(map.values()).is_object());
}