1- port module Main exposing (..)
1+ module Main exposing (..)
22
33import Expect
44import Fuzz exposing (..)
5- import Json.Encode exposing (Value )
65import MapExercises exposing (..)
76import Test exposing (..)
8- import Test.Runner.Node exposing (TestProgram , run )
9-
10-
11- allTests : Test
12- allTests =
13- describe " All Tests"
14- [ listTests
15- , maybeTests
16- , resultTests
17- ]
187
198
209listTests : Test
@@ -73,7 +62,7 @@ maybeTests =
7362 Expect . equal
7463 ( headOfTheList xs)
7564 ( List . head xs)
76- , fuzz ( list ( maybe int)) " gets the head of the list" <|
65+ , fuzz ( list ( maybe int)) " gets the head of the list pt. II " <|
7766 \ xs ->
7867 Expect . equal
7968 ( headOfTheList xs)
@@ -117,7 +106,7 @@ maybeTests =
117106 Expect . equal
118107 ( addMaybes Nothing ( Just 800 ))
119108 Nothing
120- , test " If either is Nothing return Nothing" <|
109+ , test " If either is Nothing return Nothing pt. II " <|
121110 \ () ->
122111 Expect . equal
123112 ( addMaybes ( Just 800 ) Nothing )
@@ -128,7 +117,8 @@ maybeTests =
128117
129118resultTests : Test
130119resultTests =
131- describe " result tests"
120+ describe
121+ " result tests"
132122 [ describe " getMyAge tests"
133123 [ test " parses an age string correctly" <|
134124 \ () ->
@@ -164,7 +154,7 @@ resultTests =
164154 Expect . equal
165155 ( combinedAge " 28" " blergh" )
166156 ( Err " could not convert string 'blergh' to an Int" )
167- , test " returns an Err if either of them are invalid" <|
157+ , test " returns an Err if either of them are invalid pt. II " <|
168158 \ () ->
169159 Expect . equal
170160 ( combinedAge " blergh" " 28" )
@@ -180,15 +170,3 @@ resultTests =
180170tupleFuzzer : Fuzzer (List ( Int , String ))
181171tupleFuzzer =
182172 list <| tuple ( int, string )
183-
184-
185-
186- -- The two functions below allow the results of the tests to be printed to the terminal
187-
188-
189- main : TestProgram
190- main =
191- run emit allTests
192-
193-
194- port emit : ( String , Value ) -> Cmd msg
0 commit comments