1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
//! Example: Time control in async tests fn main() { println!("🧰 testkit-async - Time control example"); println!("🚧 Coming soon..."); // Future API: // use testkit_async::prelude::*; // // #[testkit_async::test] // async fn test_timeout() { // let clock = MockClock::new(); // // let future = timeout( // Duration::from_secs(30), // slow_operation() // ); // // // Advance time instantly! // clock.advance(Duration::from_secs(31)); // // // Test completes in microseconds // assert!(future.await.is_err()); // } }