$ cat Tests.elm
module Tests exposing (..)
import ElmTest exposing (..)
tests : Test
tests =
suite "A Test Suite"
[ test "Addition" (assertEqual (3 + 17) 10)
, test "String.left" (assertEqual "a" (String.left 1 "abcdefg"))
, test "This test should fail" (assert False)
]
main : Program Never
main =
runSuite tests
$ elm-make Tests.elm --output tests.js
Success! Compiled 10 modules.
elm-make: elm-stuff/build-artifacts/0.17.0/elm-community/elm-test/1.1.0/ElmTest-Runner-Console.elmo: openFile: does not exist (No such file or directory)
$ node tests.js
tests.js:3552
});
^
SyntaxError: Unexpected end of input
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:160:18)
at node.js:449:3
"exposed-modules": [],
"dependencies": {
"elm-community/elm-test": "1.1.0 <= v < 2.0.0",
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"elm-lang/html": "1.0.0 <= v < 2.0.0",
"evancz/elm-http": "3.0.1 <= v < 4.0.0",
"evancz/elm-markdown": "3.0.0 <= v < 4.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
node tests.js
onDocument: F3(on(document)),
^
ReferenceError: document is not defined
at /home/ashokb/hero/hello/tests/tests.js:7822:20
at Object.<anonymous> (/home/ashokb/hero/hello/tests/tests.js:7826:2)
at Object.<anonymous> (/home/ashokb/hero/hello/tests/tests.js:9487:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:945:3