rogeriochaves/elm-test-bdd-style/4.0.0

NOTE: this package is not compatible with Elm 0.19.1

ElmTestBDDStyle

BDD style functions for ElmTest

Tests

type alias Test =
Test

The basic unit of testability.

type alias Assertion =
Assertion

Assertion type, use that for building custom matchers

describe : String -> List Test -> Test

A group of related behaviours specs

it : String -> Assertion -> Test

Describes a behaviour you expect from your code

Matchers

expect : a -> (a -> b) -> b

Expectation to actually run the test, it receives two values and try to match then with a matcher

toBe : a -> a -> Assertion

Expect something to be equals something else

notToBe : a -> a -> Assertion

Expect something not to be equals something else

toBeTruthy : Bool -> Assertion

Expect something to be true

Property-based testing

itAlways : String -> (String -> Test) -> Test

Adds a description to the random generated tests

(a -> b)
-> Conjunction
-> (a -> b)
-> Conjunction
-> Producer a
-> String
-> Test

Generates a hundred tests with random input beginning with the initial seed 1

isTheSameAs : Conjunction

Idiomatic word helper

forEvery : Conjunction

Idiomatic word helper