Function run_test

Source
pub async fn run_test<A, S>(
    app: A,
    options: PrepareOptions,
    test_fn: impl AsyncFnOnce(&TestAppState<A, S>),
) -> RoadsterResult<()>
where S: Clone + Send + Sync + 'static, AppContext: FromRef<S>, A: App<S> + Send + Sync + 'static,
Expand description

Similar to run, except intended to be used in tests. Does all of the same setup and teardown logic as run, but does not actually run the registered crate::service::AppServices.

Note: If the test panics, the teardown logic will not be run.