mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-20 00:27:26 +03:00
17 lines
422 B
Rust
17 lines
422 B
Rust
use wasm_bindgen_test::*;
|
|
use wasm_bindgen::prelude::*;
|
|
use web_sys::HtmlDivElement;
|
|
|
|
#[wasm_bindgen(module = "./tests/wasm/element.js")]
|
|
extern {
|
|
fn new_div() -> HtmlDivElement;
|
|
}
|
|
|
|
#[wasm_bindgen_test]
|
|
fn test_div_element() {
|
|
let element = new_div();
|
|
assert_eq!(element.align(), "", "Shouldn't have a align");
|
|
element.set_align("right");
|
|
assert_eq!(element.align(), "right", "Should have a align");
|
|
}
|