package tezos-base-test-helpers

  1. Overview
  2. Docs

Module Tezos_base_test_helpers.TztestSource

tztest contains the definition of tztest: a wrapper for tests cases running in the error monad. It also adds helpers for working with the mock sink.

Sourceval tztest : string -> Alcotest.speed_level -> (unit -> (unit, Tezos_error_monad.TzCore.error list) result Lwt.t) -> unit Alcotest_lwt.test_case

Transform a function running in the error monad into an Alcotest, taking care of failing the test if the function results is an error. Note that the given function must still take care of test assertions, e.g. by using Alcotest.check.

Sourceval tztest_qcheck : name:string -> 'a QCheck.arbitrary -> ('a -> ('b, Tezos_error_monad.TzCore.error list) result Lwt.t) -> unit Alcotest_lwt.test_case
Sourceval mock_sink : Tezos_event_logging_test_helpers.Mock_sink.t Tezos_base__TzPervasives.Internal_event.sink_definition
Sourceval with_empty_mock_sink : (unit -> unit Lwt.t) -> unit Lwt.t

with_empty_mock_sink f executes f after activating or clearing a Mock_sink sink.

Sinks can only be registered and activated once, and not removed thereafter.

OCaml

Innovation. Community. Security.