Add ArrayBuffer.prototype.byteLength to js-sys

This commit is contained in:
Camille TJHOA
2018-08-06 15:27:47 +00:00
committed by Alex Crichton
parent 0bdb31d41e
commit aeca24c7ab
2 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,12 @@ fn new() {
assert!(y.is_object());
}
#[wasm_bindgen_test]
fn byte_length() {
let buf = ArrayBuffer::new(42);
assert_eq!(buf.byte_length(), 42);
}
#[wasm_bindgen_test]
fn is_view() {
let x = Uint8Array::new(&JsValue::from(42));