# `Croma.Defpt`
[🔗](https://github.com/skirino/croma/blob/main/lib/croma/defpt.ex#L1)

Module that provides `Croma.Defpt.defpt/2` macro.

# `defpt`
*macro* 

Defines a unit-testable private function.
When `Mix.env() == :test`, `defpt` defines a public function and thus it can be freely called from tests.
Otherwise functions defined by `defpt` become private.
Usage of this macro is exactly the same as the standard `def` and `defp` macros.

## Example
    use Croma

    defmodule M do
      defpt f(x) do
        IO.inspect(x)
      end
    end

---

*Consult [api-reference.md](api-reference.md) for complete listing*
