This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
We were not able to find the expected elm-package.json file at this tag.
Tag 6.1.2
Committed At 2018-09-30 14:59:27 UTC



    elm-test-bdd-style Build Status

    BDD style matchers on top of elm-test. It's a very simple syntax sugar.

    Getting started

    First, follow the getting started steps from the elm-test package.

    Then, install elm-test-bdd-style:

    elm-test install rogeriochaves/elm-test-bdd-style

    To use it, just import it on your test:

    import ElmTestBDDStyle exposing (..)

    Usage example

    -- Example.elm
    module Example exposing (..)
    import Test exposing (..)
    import Expect exposing (..)
    import Fuzz exposing (..)
    import ElmTestBDDStyle exposing (..)
    tests : Test
    tests =
        describe "Example Text"
            [ it "does math correctly" <|
                expect (1 + 1) to equal 2
            , it "does not miscalculate things" <|
                expect (2 + 2) to notEqual 5
            , it "exemplifies more complex test cases" <|
                    expression =
                        2 + 2
                    expect expression to equal 4
            , it "compares two numbers" <|
                expect (10 > 5) toBe true "math should work"
            , it "compares two numbers" <|
                expect 10 toBe greaterThan 5
            , fuzz (list int) "ends up with the same list when reversing twice" <|
                \fuzzList ->
                    expect (List.reverse (List.reverse fuzzList)) to equal fuzzList

    Extending it

    You can use ktonon/elm-test-exta for extra matchers such as match and contain.

    You may also write your own matchers and other functions to make your tests as idiomatic as you want. For some examples, check out the tests/BetterSpecs.elm file on this project to see a reimplementation of in Elm.