mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
fix: improving tick logic in any_spawner
This commit is contained in:
@@ -1025,6 +1025,8 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn patching_only_notifies_changed_field_with_custom_patch() {
|
||||
_ = any_spawner::Executor::init_tokio();
|
||||
|
||||
#[derive(Debug, Store, Patch, Default)]
|
||||
struct CustomTodos {
|
||||
#[patch(|this, new| *this = new)]
|
||||
@@ -1038,8 +1040,6 @@ mod tests {
|
||||
completed: bool,
|
||||
}
|
||||
|
||||
_ = any_spawner::Executor::init_tokio();
|
||||
|
||||
let combined_count = Arc::new(AtomicUsize::new(0));
|
||||
|
||||
let store = Store::new(CustomTodos {
|
||||
@@ -1094,6 +1094,7 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn notifying_all_descendants() {
|
||||
use reactive_graph::traits::*;
|
||||
|
||||
_ = any_spawner::Executor::init_tokio();
|
||||
|
||||
#[derive(Debug, Clone, Store, Patch, Default)]
|
||||
|
||||
@@ -251,6 +251,8 @@ mod tests {
|
||||
async fn patch() {
|
||||
use crate::OptionStoreExt;
|
||||
|
||||
_ = any_spawner::Executor::init_tokio();
|
||||
|
||||
#[derive(Debug, Clone, Store, Patch)]
|
||||
struct Outer {
|
||||
inner: Option<Inner>,
|
||||
@@ -269,8 +271,6 @@ mod tests {
|
||||
}),
|
||||
});
|
||||
|
||||
_ = any_spawner::Executor::init_tokio();
|
||||
|
||||
let parent_count = Arc::new(AtomicUsize::new(0));
|
||||
let inner_first_count = Arc::new(AtomicUsize::new(0));
|
||||
let inner_second_count = Arc::new(AtomicUsize::new(0));
|
||||
|
||||
Reference in New Issue
Block a user