package webtest
-
webtest.js
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Types and functions for creating and structuring unit test suites.
module Sync : sig ... end
module Async : sig ... end
type t =
| TestCase of string * Async.test_fun
A labelled single test.
*)| TestList of string * t list
A labelled list of tests.
*)A labelled wrapper around a test or list of suites.
val (>::) : string -> Sync.test_fun -> t
Convenience function to create a suite from a label and a Sync.test_fun.
val (>:~) : string -> Async.test_fun -> t
Convenience function to create a suite from a label and a Sync.test_fun.
Convenience function to create a suite from a label and an Async.test_fun.
Convenience function to create a suite from a label and an Async.test_fun.
Convenience function to create a suite from a label and a list of suites.
assert_bool label value
returns unit if value
is true, and otherwise raises TestFailure.
val assert_equal :
?equal:('a -> 'a -> bool) ->
?label:string ->
?printer:('a -> string) ->
'a ->
'a ->
unit
assert_equal a b
returns unit if a
is equal to b
, and otherwise raises TestFailure.
assert_raises e task
returns unit if task ()
raises e
, and otherwise raises TestFailure.
assert_raises_string str task
returns unit if task ()
raises an exception e
for which Printexc.to_string e = str
, and otherwise raises TestFailure.