API Reference Machete v0.2.3

modules

Modules

Machete provides ergonomic match operators to help make your ExUnit tests more literate

Defines a matcher that matches against a set of matchers, requiring all of them to match

Defines a matcher that matches against a set of matchers, requiring at least one of them to match

Macros for use within the context of ExUnit tests, to provide ~> awareness to assert/1 and refute/1 macros. Because macros cannot be defined in multiple modules, proper use of this module requires the user to take ExUnit.Assertions' version of assert/1 and refute/1 out of scope, and to allow this module's versions of those macros to call through to ExUnit.Assertions' version for conditions other than ~>. See Machete.__using__/1 for details.

Defines a matcher that matches atom values

Defines a matcher that matches boolean values

Defines a matcher that matches Date values

Defines a matcher that matches DateTime values

Defines a matcher that matches falsy values

Defines a matcher that matches float values

Defines a matcher that matches ISO8601 formatted strings

Defines a matcher that matches lists in any order

Defines a matcher that matches indifferently (that is, it considers similar atom and string keys to be equivalent)

Defines a matcher that matches integer values

Defines a matcher that matches againt a type of struct

Defines a matcher that matches lists

Defines a matcher that matches maps

Defines a protocol to determine how a given term may match against a type. The Machete.Matchable protocol is central to the Machete library, and conformance to it is necessary for any type to be used on the right hand side of a ~> match

Defines a matcher that matches against another matcher & also matches nil

Data and functions to deal with representing mismatches

Defines a matcher that matches NaiveDateTime values

Defines a matcher that matches against a set of matchers, requiring none of them to match

Defines implementations for the ~> and ~>> operators

Defines a matcher that matches PID values

Defines a matcher that matches port values

Defines a matcher that matches reference values

Defines a matcher that matches string values

Defines a matcher that matches structs only on a specified list of fields

Defines a matcher that matches maps which are a subset of a specified map

Defines a matcher that matches maps which are a superset of a specified map

Defines a matcher that matches everything

Defines a matcher that matches Time values

Defines a matcher that matches truthy values