wasm-bindgen/crates/web-sys/tests/wasm/heading_element.rs
Alex Crichton 7ecf4aae87 cargo +nightly fmt --all
Rustfmt all the things!
2018-09-26 08:26:00 -07:00

17 lines
447 B
Rust

use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use web_sys::HtmlHeadingElement;
#[wasm_bindgen(module = "./tests/wasm/element.js")]
extern "C" {
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");
}