Sha256: 2e695b4823e8875aa72c41aa6679e4d3f924adf47b763cb4462cf96ecdacfda6

Contents?: true

Size: 482 Bytes

Versions: 11

Compression:

Stored size: 482 Bytes

Contents

use js_sys::*;
use wasm_bindgen::JsCast;
use wasm_bindgen::JsValue;
use wasm_bindgen_test::*;

#[wasm_bindgen_test]
fn uri_error() {
    let error = UriError::new("msg");
    assert!(error.is_instance_of::<UriError>());
    assert!(error.is_instance_of::<Error>());
    assert!(error.is_instance_of::<Object>());
    let _: &Error = error.as_ref();
    let _: &Object = error.as_ref();

    let base: &Error = error.as_ref();
    assert_eq!(JsValue::from(base.message()), "msg");
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-22.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-21.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-20.0.2 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-20.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-18.0.3 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-17.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-17.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-16.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-15.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs
wasmtime-15.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/UriError.rs