exercism/elm/hello-world/HelloWorldTests.elm

19 lines
489 B
Elm
Raw Normal View History

2016-08-15 19:08:39 +00:00
module Main exposing (..)
import ElmTest exposing (..)
import HelloWorld exposing (helloWorld)
tests : Test
tests =
suite "Hello, World!"
[ test "Hello with no name" (assertEqual "Hello, World!" (helloWorld Nothing))
, test "Hello to a sample name" (assertEqual "Hello, Alice!" (helloWorld (Just "Alice")))
, test "Hello to another sample name" (assertEqual "Hello, Bob!" (helloWorld (Just "Bob")))
]
main : Program Never
main =
runSuite tests