package webtest

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Suite.AsyncSource

Sourcetype callback = unit -> unit

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

Sourceval noop : callback

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

Sourcetype wrapper = callback -> unit

A wrapper function to be passed to an asynchronous test.

Sourcetype 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.

Sourceval 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.

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

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

Sourceval of_sync : Sync.test_fun -> test_fun

Convert a synchronous test into an asynchronous test.