yew/tests/vtext_test.rs
Justin Starry f61667be97
Remove generics from virtual dom (#783)
* Fix tests

* Remove generics from virtual dom

* Prep for degenerify

* Fix examples

* Remove props cloning

* Fix tests
2019-12-08 10:47:51 -08:00

37 lines
718 B
Rust

#[cfg(feature = "wasm_test")]
use wasm_bindgen_test::{wasm_bindgen_test as test, wasm_bindgen_test_configure};
use yew::{html, Component, ComponentLink, Html, ShouldRender};
#[cfg(feature = "wasm_test")]
wasm_bindgen_test_configure!(run_in_browser);
struct Comp;
impl Component for Comp {
type Message = ();
type Properties = ();
fn create(_: Self::Properties, _: ComponentLink<Self>) -> Self {
Comp
}
fn update(&mut self, _: Self::Message) -> ShouldRender {
unimplemented!();
}
fn view(&self) -> Html {
unimplemented!();
}
}
#[test]
fn text_as_root() {
html! {
"Text Node As Root"
};
html! {
{ "Text Node As Root" }
};
}