2021-08-08 19:15:16 +00:00
|
|
|
use bumpalo::Bump;
|
|
|
|
|
|
|
|
use anyhow::{Context, Result};
|
2021-08-25 19:54:33 +00:00
|
|
|
use dioxus::{diff::DiffMachine, prelude::*, scheduler::Scheduler, DomEdit};
|
2021-08-08 19:15:16 +00:00
|
|
|
use dioxus_core as dioxus;
|
|
|
|
use dioxus_html as dioxus_elements;
|
|
|
|
|
|
|
|
#[async_std::test]
|
|
|
|
async fn event_queue_works() {
|
|
|
|
static App: FC<()> = |cx| {
|
|
|
|
cx.render(rsx! {
|
|
|
|
div { "hello world" }
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
let mut dom = VirtualDom::new(App);
|
2021-08-24 19:12:20 +00:00
|
|
|
let edits = dom.rebuild();
|
2021-08-08 19:15:16 +00:00
|
|
|
|
|
|
|
async_std::task::spawn_local(async move {
|
2021-08-25 16:42:50 +00:00
|
|
|
let mutations = dom.run_unbounded().await;
|
2021-08-08 19:15:16 +00:00
|
|
|
});
|
|
|
|
}
|