Skip to content

Instantly share code, notes, and snippets.

@fredcy
Last active November 4, 2016 14:08
Show Gist options
  • Save fredcy/e4d9a37e621f881057339dbf87144aa8 to your computer and use it in GitHub Desktop.
Save fredcy/e4d9a37e621f881057339dbf87144aa8 to your computer and use it in GitHub Desktop.
Example of failing Elm test with no detail
$ elm --version
0.18.0
$ elm-test --version
0.17.3
$ cat elm-stuff/exact-dependencies.json
{
"elm-community/lazy-list": "1.0.0",
"elm-community/elm-test": "3.0.0",
"elm-community/shrink": "2.0.0",
"elm-lang/virtual-dom": "2.0.0",
"mgold/elm-random-pcg": "4.0.2",
"elm-lang/lazy": "2.0.0",
"elm-lang/html": "2.0.0",
"elm-community/json-extra": "2.0.0",
"rtfeldman/node-test-runner": "3.0.1",
"elm-lang/core": "5.0.0"
}$
port module Main exposing (..)
import Json.Encode
import Test exposing (Test, describe, test)
import Test.Runner.Node
import Expect
main =
Test.Runner.Node.run emit <|
describe "failures"
[ test "should fail" <| \() -> Expect.equal 3 4 ]
port emit : ( String, Json.Encode.Value ) -> Cmd msg
$ elm-test FailingElmTest.elm
Success! Compiled 1 module.
Successfully generated /var/folders/sn/_31k3vmx3v712cxxvlgs_t_w0000gn/T/elm_test_116104-35620-v8tkls.jmvogsnhfr.js
TEST RUN FAILED
Duration: 10 ms
Passed: 0
Failed: 1
@fredcy
Copy link
Author

fredcy commented Nov 4, 2016

When run with Elm 0.18 beta and elm-test (CLI) 0.17.3 this reports that the test failed but does not given any details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment