mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 14:27:36 +03:00
17 lines
443 B
Rust
17 lines
443 B
Rust
use wasm_bindgen_test::*;
|
|
use wasm_bindgen::prelude::*;
|
|
use web_sys::HtmlHeadingElement;
|
|
|
|
#[wasm_bindgen(module = "./tests/wasm/element.js")]
|
|
extern {
|
|
fn new_heading() -> HtmlHeadingElement;
|
|
}
|
|
|
|
#[wasm_bindgen_test]
|
|
fn heading_element() {
|
|
let element = new_heading();
|
|
assert_eq!(element.align(), "", "Shouldn't have an align");
|
|
element.set_align("justify");
|
|
assert_eq!(element.align(), "justify", "Should have an align");
|
|
}
|