blob: 2e1ddde3bc215943b1cfe7cba9e9b285724854dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use web_sys::HtmlParagraphElement;
#[wasm_bindgen(module = "/tests/wasm/element.js")]
extern "C" {
fn new_paragraph() -> HtmlParagraphElement;
}
#[wasm_bindgen_test]
fn test_paragraph_element() {
let paragraph = new_paragraph();
paragraph.set_align("right");
assert_eq!(
paragraph.align(),
"right",
"Paragraph should be aligned 'right'."
);
}
|