Minor fixes for tests (#4686)

* Suggested method for correcting integration tests

* Use static atomics for simplicity

This is consistent with the test immediately below.

* Add assertions to some tests, comments to others

This should fix a handful of tests that didn't correctly do their test.

In other places, comments should make it clearer *why* tests are how
they are.

* Be consistent with existing imports

* remove bad test

* nit

* fix compile errrs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
MartinandJonathan Kelley authored and GitHub committed 2026-04-14 15:37:30 -07:00
1 parent 679ba83652
commit 79693f8cff
12 files changed
+74 -77

No files matched your search

-32
View File
@@ -217,22 +217,6 @@ fn suspended_nodes_dont_trigger_effects() {
}
}
#[component]
fn RerendersFrequently() -> Element {
let mut count = use_signal(|| 0);
use_future(move || async move {
for _ in 0..100 {
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
count.set(count() + 1);
}
});
rsx! {
div { "rerenders frequently" }
}
}
#[component]
fn Child() -> Element {
let mut future_resolved = use_signal(|| false);
@@ -474,22 +458,6 @@ fn toggle_suspense() {
fn nested_suspense_resolves_client() {
use Mutation::*;
async fn poll_three_times() {
// Poll each task 3 times
let mut count = 0;
poll_fn(|cx| {
println!("polling... {}", count);
if count < 3 {
count += 1;
cx.waker().wake_by_ref();
Poll::Pending
} else {
Poll::Ready(())
}
})
.await;
}
fn app() -> Element {
rsx! {
SuspenseBoundary {