mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Fix tests * Remove generics from virtual dom * Prep for degenerify * Fix examples * Remove props cloning * Fix tests
37 lines
718 B
Rust
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" }
|
|
};
|
|
}
|