package mock-ounit

  1. Overview
  2. Docs
OUnit wrapper for OCaml mock

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.0.tar.gz
md5=67deb0f8161f966bef6a422349dd88ad
sha512=3cad4d869563f4f187cc388170186825e0259a3f0a2d0c956ba47cb1f22ce08860677d80c04451d0b448745d76fef7f1c87e11ac1130548cb8506d5bc5715cd8

Description

Published: 24 Feb 2023

README

Mock - configurable functions to test impure code

This package provides "mocks", fake functions that can be configured to return values or raise exceptions. It is possible to inspect their arguments after their execution. The API is greatly inspired by unittest.mock in Python.

There is no magic under the hood, it is "just" a reference to a function, but it makes it possible to have pleasant output like this in your tests:

A wrapper for OUnit is available as mock-ounit.

Dependencies (4)

  1. ounit2
  2. ocaml >= "4.07.0"
  3. mock
  4. dune

Dev Dependencies (1)

  1. ppx_deriving with-test

Used by (1)

  1. zeit

Conflicts

None