package async

  1. Overview
  2. Docs

An alternative to Async.Deferred_or_error_expect_test_config in which %expect has type unit rather than unit Deferred.Or_error.t. This lets one write:

[%expect {| |};

rather than:

let%bind () = [%expect {| |}] in

It also means that let%expect cannot terminate with %expect, and must instead terminate with return ().

include Expect_test_config_types.S with type 'a IO.t = 'a Async_kernel.Deferred.Or_error.t
module IO : sig ... end
val run : (unit -> unit IO.t) -> unit

Run an IO operation until completion

val sanitize : string -> string

sanitize can be used to map all output strings, e.g. for cleansing.

val upon_unreleasable_issue : [ `CR | `Warning_for_collector_testing ]

upon_unreleasable_issue specifies how to deal with output that should not be released even if it is accepted (e.g. backtraces). The default is `CR.

OCaml

Innovation. Community. Security.