elm-explorations/test/1.1.0

NOTE: the latest version is 2.2.1

Test.Runner.Failure

The reason a test failed.

type Reason
= Custom
| Equality String String
| Comparison String String
| ListDiff (List String) (List String)
| CollectionDiff
{ expected : String
, actual : String
, extra : List String
, missing : List String
}
| TODO
| Invalid InvalidReason

The reason a test failed.

Test runners can use this to provide nice output, e.g. by doing diffs on the two parts of an Expect.equal failure.

= EmptyList
| NonpositiveFuzzCount
| InvalidFuzzer
| BadDescription
| DuplicatedName

The reason a test run was invalid.

Test runners should report these to the user in whatever format is appropriate.

format : String -> Reason -> String

DEPRECATED. In the future, test runners should implement versions of this that make sense for their own environments.

Format test run failures in a reasonable way.