summaryrefslogtreecommitdiffstats
path: root/vendor/js-sys/tests
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/js-sys/tests')
-rw-r--r--vendor/js-sys/tests/wasm/Boolean.rs2
-rw-r--r--vendor/js-sys/tests/wasm/DataView.rs11
-rw-r--r--vendor/js-sys/tests/wasm/TypedArray.rs6
-rw-r--r--vendor/js-sys/tests/wasm/WebAssembly.rs1
4 files changed, 7 insertions, 13 deletions
diff --git a/vendor/js-sys/tests/wasm/Boolean.rs b/vendor/js-sys/tests/wasm/Boolean.rs
index 5e4b3faa4..2021d10a2 100644
--- a/vendor/js-sys/tests/wasm/Boolean.rs
+++ b/vendor/js-sys/tests/wasm/Boolean.rs
@@ -11,7 +11,7 @@ fn new_undefined() {
#[allow(deprecated)]
#[wasm_bindgen_test]
-fn new_truely() {
+fn new_truly() {
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
}
diff --git a/vendor/js-sys/tests/wasm/DataView.rs b/vendor/js-sys/tests/wasm/DataView.rs
index 7747019a5..e2014ca3e 100644
--- a/vendor/js-sys/tests/wasm/DataView.rs
+++ b/vendor/js-sys/tests/wasm/DataView.rs
@@ -7,8 +7,7 @@ use wasm_bindgen_test::*;
fn test() {
let bytes = Int8Array::new(&JsValue::from(10));
- // TODO: figure out how to do `bytes[2] = 2`
- bytes.subarray(2, 3).fill(2, 0, 1);
+ bytes.set_index(2, 2);
let v = DataView::new(&bytes.buffer(), 2, 8);
assert_eq!(v.byte_offset(), 2);
@@ -63,18 +62,14 @@ fn test() {
v.set_int8(0, 42);
- // TODO: figure out how to do `bytes[2]`
- bytes
- .subarray(2, 3)
- .for_each(&mut |x, _, _| assert_eq!(x, 42));
+ assert_eq!(bytes.get_index(2), 42);
}
#[wasm_bindgen_test]
fn dataview_inheritance() {
let bytes = Int8Array::new(&JsValue::from(10));
- // TODO: figure out how to do `bytes[2] = 2`
- bytes.subarray(2, 3).fill(2, 0, 1);
+ bytes.set_index(2, 2);
let v = DataView::new(&bytes.buffer(), 2, 8);
diff --git a/vendor/js-sys/tests/wasm/TypedArray.rs b/vendor/js-sys/tests/wasm/TypedArray.rs
index 653e6ea72..adb468313 100644
--- a/vendor/js-sys/tests/wasm/TypedArray.rs
+++ b/vendor/js-sys/tests/wasm/TypedArray.rs
@@ -16,7 +16,7 @@ macro_rules! each {
};
}
-macro_rules! test_inheritence {
+macro_rules! test_inheritance {
($arr:ident) => {{
let arr = $arr::new(&JsValue::undefined());
assert!(arr.is_instance_of::<$arr>());
@@ -25,8 +25,8 @@ macro_rules! test_inheritence {
}};
}
#[wasm_bindgen_test]
-fn inheritence() {
- each!(test_inheritence);
+fn inheritance() {
+ each!(test_inheritance);
}
macro_rules! test_undefined {
diff --git a/vendor/js-sys/tests/wasm/WebAssembly.rs b/vendor/js-sys/tests/wasm/WebAssembly.rs
index 8a9b6ce18..4a2365481 100644
--- a/vendor/js-sys/tests/wasm/WebAssembly.rs
+++ b/vendor/js-sys/tests/wasm/WebAssembly.rs
@@ -2,7 +2,6 @@ use js_sys::*;
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::JsFuture;
use wasm_bindgen_test::*;
-use web_sys::{Headers, Response, ResponseInit};
#[wasm_bindgen(module = "tests/wasm/WebAssembly.js")]
extern "C" {