From 518a52982805cb26877e3bf88c59e99caf998193 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sun, 21 Aug 2016 16:42:13 +0100 Subject: [PATCH 1/2] Correct docs --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ea1755b..876266f 100644 --- a/README.md +++ b/README.md @@ -64,16 +64,24 @@ import ElmTest exposing (..) tests : Test tests = - suite - "ExerciseModuleName" - [ test "first test" (assertEqual True True) - , test "second test" (assertEqual False False) - ] + describe "Bob" + [ test "first test" <| + \() -> + True + |> Expect.equal True + , test "second test" <| + \() -> + False + |> Expect.equal False + ] main : Program Never main = - runSuite tests + run emit tests + + +port emit : ( String, Value ) -> Cmd msg ``` - All the tests for xElm exercises can be run from the top level of the repo with `bin/build.sh`. Please run this command before submitting your PR. From 8689cbf130ad54d1f712528f319d58c5710f4278 Mon Sep 17 00:00:00 2001 From: Erik Simmler Date: Sun, 21 Aug 2016 21:52:35 -0400 Subject: [PATCH 2/2] Add imports and exposing to readme example --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 876266f..6ef7be1 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,12 @@ Please keep the following in mind: - Test files should use the following format: ```elm -module Main exposing (..) +port module Main exposing (..) -import ElmTest exposing (..) +import Test.Runner.Node exposing (run) +import Json.Encode exposing (Value) +import Test exposing (..) +import Expect tests : Test