Registry / testing / tokio-test

tokio-test

JSON →
library0.4.5rscratesunverified

Testing utilities for Tokio- and futures-based code.

# Cargo.toml [dependencies] tokio-test = "0.4.5"
INSTALL
IMPORT
SIG · TOKIO-TEST
T
tokio-test
testingrustv0.4.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

block_on
use tokio_test::block_on;

Use block_on to run async code in synchronous test contexts.

use tokio_test::block_on; async fn hello() -> &'static str { "Hello, world!" } let result = block_on(hello()); assert_eq!(result, "Hello, world!");
Debug
Known issues
gotchaRequires Tokio runtime features for full functionality
fix
Ensure tokio is included with appropriate features (e.g., rt, macros) in Cargo.toml
affects: >=0.4.0
Upgrade
Version history
0.4.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
40
Resources
tokio-test — cargo add tokio-test · libregistry