The it function creates a spec item.
A spec item consists of:
a textual description of a desired behavior
an example for that behavior
describe "absolute" $ do
it "returns a positive number when given a negative number" $
absolute (-1) == 1Example a optionally accepts an argument Arg a, which is then given
to the test body. This is useful for provisioning resources for a test which
are created and cleaned up outside the test itself. See Arg for details.
Note that this function is often on the scene of nasty type errors due to GHC failing
to infer the type of do notation in the test body.
It can be helpful to use
TypeApplications
to explicitly specify the intended Example type.