This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Extra expectations, fuzzers, testers and describers
version 1.6.2
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.6.2
Committed At 2017-09-12 00:37:49 UTC
mgold/elm-random-pcg 5.0.0 <= v < 6.0.0 5.0.2
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1
elm-community/elm-test 4.0.0 <= v < 5.0.0 4.2.0
eeue56/elm-shrink 1.0.0 <= v < 2.0.0 1.0.0

README

elm-test-extra

CircleCI

Extra expectations, fuzzers, testers and describers.

elm package install ktonon/elm-test-extra

Example: Describing JSON Decoders

Write concise test for JSON decoders.

Use the high level describeDecoder to quickly write tests that exercise a Json.Decode.Decoder. For example,

describeDecoder "int"
  Json.Decode.int
  [ ( "", FailsToDecode )
  , ( "\"foo\"", FailsToDecode )
  , ( "1", DecodesTo 1 )
  , ( "1.5", FailsToDecode )
  , ( "\"this-will-fail\"", DecodesTo 5)
  ]

In this example, the last test will fail, giving helpful feedback:

↓ int
✗ this-will-fail DecodesTo 5

    Expected input:
      this-will-fail
    to decode successfully, but instead it failed with message:
      Expecting an Int but instead got: "this-will-fail"