mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
add extends for JsString
This commit is contained in:
@ -1,7 +1,21 @@
|
||||
use wasm_bindgen::JsValue;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use wasm_bindgen_test::*;
|
||||
use js_sys::*;
|
||||
|
||||
#[wasm_bindgen(module = "tests/wasm/JsString.js")]
|
||||
extern {
|
||||
fn new_string_object() -> JsValue;
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn js_string_inheritance() {
|
||||
let string = new_string_object();
|
||||
assert!(string.is_instance_of::<JsString>());
|
||||
assert!(string.is_instance_of::<Object>());
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn length() {
|
||||
fn test(s: &str) {
|
||||
|
Reference in New Issue
Block a user