package webtest

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type callback = unit -> unit

The type of an asynchronous callback which will run as part of an asynchronous test.

val noop : callback

The noop callback - this is just an alias for fun () -> ().

type wrapper = callback -> unit

A wrapper function to be passed to an asynchronous test.

type test_fun = wrapper -> unit

An asynchronous test function. When run it will be passed a wrapper function - this should be used to wrap any asynchronous code which the test case is expected to run.

val bracket : (unit -> 'a) -> ('a -> wrapper -> unit) -> ('a -> unit) -> test_fun

bracket setup test teardown generates a test_fun which will use setup to create state needed for the test, then pass that state to test, and finally will pass that state to teardown.

val run_one : string -> test_fun -> (string -> unit) -> (outcome -> unit) -> unit

Run an asynchronous test and pass its result to a callback.

val of_sync : Sync.test_fun -> test_fun

Convert a synchronous test into an asynchronous test.

OCaml

Innovation. Community. Security.