diff --git a/packages/yew/Cargo.toml b/packages/yew/Cargo.toml index 1f9fba8c07b..da32554bbdf 100644 --- a/packages/yew/Cargo.toml +++ b/packages/yew/Cargo.toml @@ -96,6 +96,7 @@ ssr = ["dep:html-escape", "dep:base64ct", "dep:bincode"] csr = [] hydration = ["csr", "dep:bincode"] default = [] +test = [] [package.metadata.docs.rs] all-features = true diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 3e47e9a5c30..04effeb75b9 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -295,8 +295,7 @@ mod app_handle; #[cfg(feature = "csr")] mod renderer; -#[cfg(feature = "csr")] -#[cfg(test)] +#[cfg(all(feature = "csr", any(test, feature="test")))] pub mod tests; /// The module that contains all events available in the framework.