2016-08-17 11:14:17 +00:00
|
|
|
port module Main exposing (..)
|
2016-02-23 03:29:13 +00:00
|
|
|
|
2016-08-17 11:14:17 +00:00
|
|
|
import Test.Runner.Node exposing (run)
|
|
|
|
import Json.Encode exposing (Value)
|
|
|
|
import Test exposing (..)
|
|
|
|
import Expect
|
2016-03-13 18:29:54 +00:00
|
|
|
import HelloWorld exposing (helloWorld)
|
2016-02-23 03:29:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
tests : Test
|
|
|
|
tests =
|
2016-08-17 11:14:17 +00:00
|
|
|
describe "Hello, World!"
|
|
|
|
[ test "Hello with no name" <|
|
|
|
|
\() ->
|
|
|
|
Expect.equal "Hello, World!" (helloWorld Nothing)
|
|
|
|
, test "Hello to a sample name" <|
|
|
|
|
\() ->
|
|
|
|
Expect.equal "Hello, Alice!" (helloWorld (Just "Alice"))
|
|
|
|
, test "Hello to another sample name" <|
|
|
|
|
\() ->
|
|
|
|
Expect.equal "Hello, Bob!" (helloWorld (Just "Bob"))
|
2016-06-19 21:46:13 +00:00
|
|
|
]
|
2016-02-23 03:29:13 +00:00
|
|
|
|
|
|
|
|
2016-08-23 00:31:41 +00:00
|
|
|
main : Program Value
|
2016-05-13 02:26:52 +00:00
|
|
|
main =
|
2016-08-17 11:14:17 +00:00
|
|
|
run emit tests
|
|
|
|
|
|
|
|
|
|
|
|
port emit : ( String, Value ) -> Cmd msg
|