Create project and install packages:
elm-package install -y elm-lang/core
elm-package install -y elm-community/elm-test
Run tests:
elm-make tests/Tests.elm --output testRunner.js && node testRunner.js
import ElmTest exposing (..) | |
import String | |
tests : Test | |
tests = | |
suite "A Test Suite" | |
[ | |
test "Addition" (assertEqual (3 + 7) 10), | |
test "String.left" (assertEqual "a" (String.left 1 "abcdefg")), | |
test "This test should pass" (assert True) | |
] | |
main = | |
runSuite tests |