I'm writing a test that needs to call async function before asserting on result.
Test looks something like this:
#[cfg(test)]
mod test {
#[tokio::test]
async fn test_foo() {
let foo = make_foo().await.expect("Error making foo");
assert_eq(foo, 1);
}
}
I keep getting this error:
there is no timer running, must be called from the context of Tokio runtime
What am I missing here?