rogeriochaves/elm-test-bdd-style/2.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.

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 -> Bool) -> b -> Assertion

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

toBe : a -> a -> Bool

Expect something to be equals something else

notToBe : a -> a -> Bool

Expect something not to be equals something else

Property-based testing

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

Adds a description to the random generated tests

(a -> b)
-> Conjunction
-> (a -> b)
-> Conjunction
-> Investigator 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