{"id":66788,"library":"tokio-mock-task","title":"Tokio Mock Task","description":"Mock a Tokio task for testing purposes.","status":"active","version":"0.1.1","language":"rust","source_language":null,"source_url":"https://github.com/carllerche/tokio-mock-task","tags":["tokio","testing","mock","async"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ntokio-mock-task = \"0.1.1\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add tokio-mock-task","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"MockTask","correct":"use tokio_mock_task::MockTask;"}],"quickstart":{"code":"use tokio_mock_task::MockTask;\n\n#[tokio::test]\nasync fn test_task() {\n    let task = MockTask::new();\n    task.spawn(async {\n        // your test logic\n    });\n}","lang":"rust","description":"Creates a mock Tokio task for testing async code."},"warnings":[{"fix":"Ensure tests are run with #[tokio::test] or similar runtime attribute.","message":"Requires Tokio runtime to be active","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'async':14 'mock':2,4,13 'purpos':10 'task':3,7 'test':9,12 'tokio':1,6,11","created_at":"2026-06-17T17:28:33.972546+00:00","updated_at":"2026-06-17T17:28:33.972546+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/carllerche/tokio-mock-task","github":"https://github.com/carllerche/tokio-mock-task","docs":"https://docs.rs/tokio-mock-task/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","async"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}