chore: get tests in a working state

This commit is contained in:
Greg Johnston 2024-05-11 17:18:47 -04:00
parent 015a4b63ec
commit 7f7bba6ea3
3 changed files with 3 additions and 18 deletions

View file

@ -21,13 +21,14 @@ slotmap = "1"
thiserror = "1"
tracing = { version = "0.1", optional = true }
guardian = "1"
async-lock = "3.3.0"
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
web-sys = "0.3"
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "time", "macros"] }
any_spawner = { workspace = true, features = ["tokio"] }
any_spawner = { workspace = true, features = ["futures-executor", "tokio"] }
[features]
nightly = []

View file

@ -13,6 +13,7 @@
//! nodes, because they can listen to changes in other values.
//!
//! ```rust
//! # any_spawner::Executor::init_futures_executor();
//! use reactive_graph::{
//! computed::ArcMemo,
//! effect::Effect,

View file

@ -231,23 +231,6 @@ pub mod read {
where
T: Send + Sync + 'static,
{
/// Wraps a derived signal, i.e., any computation that accesses one or more
/// reactive signals.
/// ```rust
/// # use leptos_reactive::*;
/// # let runtime = create_runtime();
/// let (count, set_count) = create_signal(2);
/// let double_count = Signal::derive(move || count.() * 2);
///
/// // this function takes any kind of wrapped signal
/// fn above_3(arg: &Signal<i32>) -> bool {
/// arg.get() > 3
/// }
///
/// assert_eq!(above_3(&count.into()), false);
/// assert_eq!(above_3(&double_count), true);
/// # runtime.dispose();
/// ```
#[track_caller]
pub fn derive(
derived_signal: impl Fn() -> T + Send + Sync + 'static,