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

17 lines
426 B
Rust

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