diff --git a/part11/test/TestRunner.elm b/part11/test/TestRunner.elm deleted file mode 100644 index 0baa6f2..0000000 --- a/part11/test/TestRunner.elm +++ /dev/null @@ -1,15 +0,0 @@ -module Main where - -import Signal exposing (Signal) - -import ElmTest exposing (consoleRunner) -import Console exposing (IO, run) -import Task - -import Tests - -console : IO () -console = consoleRunner Tests.all - -port runner : Signal (Task.Task x ()) -port runner = run console diff --git a/part11/test/Tests.elm b/part11/test/Tests.elm deleted file mode 100644 index 7c06fe2..0000000 --- a/part11/test/Tests.elm +++ /dev/null @@ -1,35 +0,0 @@ -module Tests (..) where - -import ElmTest exposing (..) -import ElmHub exposing (responseDecoder) -import Json.Decode exposing (decodeString) - - -all : Test -all = - suite - "Decoding responses from GitHub" - [ test "they can decode empty responses" - <| let - emptyResponse = - """{ "items": [] }""" - in - assertEqual - (decodeString responseDecoder emptyResponse) - (Ok []) - , test "they can decode responses with results in them" - <| let - response = - """{ "items": [ - { "id": 5, "full_name": "foo", "stargazers_count": 42 }, - { "id": 3, "full_name": "bar", "stargazers_count": 77 } - ] }""" - in - assertEqual - (decodeString responseDecoder response) - (Ok - [ { id = 5, name = "foo", stars = 42 } - , { id = 3, name = "bar", stars = 77 } - ] - ) - ] diff --git a/part11/test/elm-package.json b/part11/test/elm-package.json deleted file mode 100644 index a9183a1..0000000 --- a/part11/test/elm-package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "1.0.0", - "summary": "Like GitHub, but for Elm stuff.", - "repository": "https://github.com/rtfeldman/elm-workshop.git", - "license": "BSD-3-Clause", - "source-directories": [ - ".", - ".." - ], - "exposed-modules": [], - "dependencies": { - "NoRedInk/elm-decode-pipeline": "1.1.2 <= v < 2.0.0", - "elm-lang/core": "4.0.1 <= v < 5.0.0", - "elm-lang/html": "1.0.0 <= v < 2.0.0", - "evancz/elm-http": "3.0.1 <= v < 4.0.0" - }, - "elm-version": "0.17.0 <= v < 0.18.0" -} diff --git a/part12/ElmHub/Css.elm b/part12/ElmHub/Css.elm index 58b5769..b897eb4 100644 --- a/part12/ElmHub/Css.elm +++ b/part12/ElmHub/Css.elm @@ -1,14 +1,14 @@ -module ElmHub.Css (..) where +module ElmHub.Css exposing (..) import Css exposing (..) css = - stylesheet - [ ((.) "content") - [ width (px 960) - , margin2 zero auto - , padding (px 30) - , fontFamilies [ "Helvetica", "Arial", "serif" ] + stylesheet + [ ((.) "content") + [ width (px 960) + , margin2 zero auto + , padding (px 30) + , fontFamilies [ "Helvetica", "Arial", "serif" ] + ] ] - ] diff --git a/part12/Stylesheets.elm b/part12/Stylesheets.elm index 5bd28a0..cef5923 100644 --- a/part12/Stylesheets.elm +++ b/part12/Stylesheets.elm @@ -1,4 +1,4 @@ -module Stylesheets (..) where +module Stylesheets exposing (..) import Css.File exposing (..) import ElmHub.Css @@ -6,5 +6,5 @@ import ElmHub.Css port files : CssFileStructure port files = - toFileStructure - [ ( "style.css", compile ElmHub.Css.css ) ] + toFileStructure + [ ( "style.css", compile ElmHub.Css.css ) ] diff --git a/part12/test/TestRunner.elm b/part12/test/TestRunner.elm deleted file mode 100644 index 0baa6f2..0000000 --- a/part12/test/TestRunner.elm +++ /dev/null @@ -1,15 +0,0 @@ -module Main where - -import Signal exposing (Signal) - -import ElmTest exposing (consoleRunner) -import Console exposing (IO, run) -import Task - -import Tests - -console : IO () -console = consoleRunner Tests.all - -port runner : Signal (Task.Task x ()) -port runner = run console diff --git a/part12/test/Tests.elm b/part12/test/Tests.elm deleted file mode 100644 index 7c06fe2..0000000 --- a/part12/test/Tests.elm +++ /dev/null @@ -1,35 +0,0 @@ -module Tests (..) where - -import ElmTest exposing (..) -import ElmHub exposing (responseDecoder) -import Json.Decode exposing (decodeString) - - -all : Test -all = - suite - "Decoding responses from GitHub" - [ test "they can decode empty responses" - <| let - emptyResponse = - """{ "items": [] }""" - in - assertEqual - (decodeString responseDecoder emptyResponse) - (Ok []) - , test "they can decode responses with results in them" - <| let - response = - """{ "items": [ - { "id": 5, "full_name": "foo", "stargazers_count": 42 }, - { "id": 3, "full_name": "bar", "stargazers_count": 77 } - ] }""" - in - assertEqual - (decodeString responseDecoder response) - (Ok - [ { id = 5, name = "foo", stars = 42 } - , { id = 3, name = "bar", stars = 77 } - ] - ) - ] diff --git a/part12/test/elm-package.json b/part12/test/elm-package.json deleted file mode 100644 index 35abeae..0000000 --- a/part12/test/elm-package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "1.0.0", - "summary": "Like GitHub, but for Elm stuff.", - "repository": "https://github.com/rtfeldman/elm-workshop.git", - "license": "BSD-3-Clause", - "source-directories": [ - ".", - ".." - ], - "exposed-modules": [], - "dependencies": { - "NoRedInk/elm-decode-pipeline": "1.1.2 <= v < 2.0.0", - "elm-lang/core": "4.0.1 <= v < 5.0.0", - "elm-lang/html": "1.0.0 <= v < 2.0.0", - "rtfeldman/elm-css": "1.0.0 <= v < 2.0.0", - "evancz/elm-http": "3.0.1 <= v < 4.0.0" - }, - "elm-version": "0.17.0 <= v < 0.18.0" -} diff --git a/part4/Main.elm b/part4/Main.elm index 7564d66..47b2fb3 100644 --- a/part4/Main.elm +++ b/part4/Main.elm @@ -98,7 +98,6 @@ update msg model = model - main : Program Never main = Html.beginnerProgram diff --git a/part8/tests/Tests.elm b/part8/tests/Tests.elm index 8263b8c..d7b452f 100644 --- a/part8/tests/Tests.elm +++ b/part8/tests/Tests.elm @@ -11,8 +11,8 @@ import String all : Test all = describe "GitHub Response Decoder" - [ test "it results in an Err for invalid JSON" - <| \() -> + [ test "it results in an Err for invalid JSON" <| + \() -> let json = """{ "pizza": [] }""" @@ -28,8 +28,8 @@ all = |> decodeString responseDecoder |> isErrorResult |> Expect.true "Expected decoding an invalid response to return an Err." - , test "it successfully decodes a valid response" - <| \() -> + , test "it successfully decodes a valid response" <| + \() -> """{ "items": [ /* TODO: put JSON here! */ ] }""" @@ -40,8 +40,8 @@ all = , { id = 3, name = "bar", stars = 77 } ] ) - , test "it decodes one SearchResult for each 'item' in the JSON" - <| \() -> + , test "it decodes one SearchResult for each 'item' in the JSON" <| + \() -> let -- TODO convert this to a fuzz test that generates a random -- list of ids instead of this hardcoded list of three ids. diff --git a/part9/tests/Tests.elm b/part9/tests/Tests.elm index 8263b8c..d7b452f 100644 --- a/part9/tests/Tests.elm +++ b/part9/tests/Tests.elm @@ -11,8 +11,8 @@ import String all : Test all = describe "GitHub Response Decoder" - [ test "it results in an Err for invalid JSON" - <| \() -> + [ test "it results in an Err for invalid JSON" <| + \() -> let json = """{ "pizza": [] }""" @@ -28,8 +28,8 @@ all = |> decodeString responseDecoder |> isErrorResult |> Expect.true "Expected decoding an invalid response to return an Err." - , test "it successfully decodes a valid response" - <| \() -> + , test "it successfully decodes a valid response" <| + \() -> """{ "items": [ /* TODO: put JSON here! */ ] }""" @@ -40,8 +40,8 @@ all = , { id = 3, name = "bar", stars = 77 } ] ) - , test "it decodes one SearchResult for each 'item' in the JSON" - <| \() -> + , test "it decodes one SearchResult for each 'item' in the JSON" <| + \() -> let -- TODO convert this to a fuzz test that generates a random -- list of ids instead of this hardcoded list of three ids.