Machete.FalsyMatcher (Machete v0.3.11)

View Source

Defines a matcher that matches falsy values

Summary

Types

Describes the arguments that can be passed to this matcher

t()

Describes an instance of this matcher

Types

opts()

@type opts() :: []

Describes the arguments that can be passed to this matcher

t()

@opaque t()

Describes an instance of this matcher

Functions

falsy(opts \\ [])

@spec falsy(opts()) :: t()

Matches against falsy values

Takes no arguments

Examples:

iex> assert false ~> falsy()
true

iex> assert nil ~> falsy()
true

iex> refute true ~> falsy()
false