blob: 9ff7d11638e946a1407a3216c2756207c3a8e9e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;
use web_sys::HtmlPreElement;
#[wasm_bindgen(module = "/tests/wasm/element.js")]
extern "C" {
fn new_pre() -> HtmlPreElement;
}
#[wasm_bindgen_test]
fn test_pre_element() {
let pre = new_pre();
pre.set_width(150);
assert_eq!(pre.width(), 150, "Pre width should be 150.");
}
|