ElmTest upkeep? command-line examples do not work

172 views
Skip to first unread message

Jessica Kerr

unread,
Aug 1, 2015, 4:14:36 PM8/1/15
to Elm Discuss
Is ElmTest updated for the current version of Elm? because my documentation PR failed the build with an old-looking error message :-(

... or is there a newer testing library that is actively updated?


---- here's the story, in case anyone else is struggling:

I'm trying to run the examples provided for ElmTest, both from the README, and from the docs (which are further out of date than the README[1]).

When they didn't work[2], I checked out ElmTest and tried to run its own Tests/Tests.elm.

First that didn't work because the library didn't even build in version 0.15.1 of elm-make. It was rejected for insufficient documentation.[3]

Then, the tests with the instructions as listed; I found the right version of the IO/elm-io.sh that does work. [4]

Finally I can run the tests in ElmTest! Now maybe I can get this working in my own project...

[1] docs lack "exposing" in the import statements, I'm guessing that's older syntax?
[2] the last line in the example is "port responses : Signal Responseresults : String" which doesn't make sense
[3] I submitted a PR that includes the documentation additions so it compiles: https://github.com/deadfoxygrandpa/Elm-Test/pull/23
[4] I changed the link to the correct elm-io.sh in the README in my PR. For searching reference, the error was: 
```
No argument was given for the port named 'responses' with type:

    IO.Runner.Response

You need to provide an initial value!

Find out more about ports here <http://elm-lang.org/learn/Ports.elm>
/Users/jessitron/code/elm/Elm-Test/test.js:8164
throw error;
      ^
Error: Port Error:
No argument was given for the port named 'responses' with type:

    IO.Runner.Response

You need to provide an initial value!

Find out more about ports here <http://elm-lang.org/learn/Ports.elm>
    at inbound (/Users/jessitron/code/elm/Elm-Test/test.js:7904:10)
...
```

Richard Feldman

unread,
Aug 1, 2015, 11:16:17 PM8/1/15
to Elm Discuss
Oh, sorry - you probably want this: https://github.com/rtfeldman/node-elm-test

It could use more documentation, but it definitely works! :)

Evan Czaplicki

unread,
Aug 2, 2015, 1:04:14 AM8/2/15
to elm-d...@googlegroups.com
Warning, I do not fully understand what is happening here!

Jessica, did Richard's thing help out? Should we mess with the documentation in ElmTest so people don't go down stale roads? If so, can we do some PR's to lead folks to a more modern thing?

On Sat, Aug 1, 2015 at 8:16 PM, Richard Feldman <richard....@gmail.com> wrote:
Oh, sorry - you probably want this: https://github.com/rtfeldman/node-elm-test

It could use more documentation, but it definitely works! :)

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron VonderHaar

unread,
Aug 2, 2015, 12:42:46 PM8/2/15
to elm-d...@googlegroups.com
(Evan),  Jessica already submitted a [PR] to improve the docs, as well as try to fix the CI build.  Is deadfoxygrandpa still maintaining Elm-Test?  Does anyone else have commit access to it?


Jessica,  [node-elm-test] that Richard mentioned is a command line tool to make it easier to run tests with Elm-Test.  It has been updated more recently than Elm-Test itself.  Testing support in Elm is an important goal, but as you've discovered, no one has gotten around to making the experience nice yet.  Thanks for your contributions!

Jessica Kerr

unread,
Aug 3, 2015, 8:33:10 AM8/3/15
to Elm Discuss
Yep! Thanks, Aaroon. Except that my PR doesn't try to fix the CI build -- is it even possible for a PR to do that? Elm-make needs updated in the build environment.

Thanks Richard! I'll switch to that.
I did get the darn thing (ElmTest) working eventually but sheesh that was a lot of yaks. It's a young language.

Sebastian Graf

unread,
Aug 11, 2015, 1:19:10 PM8/11/15
to Elm Discuss
Wow, that saved me a ton of work today. Just one amendment: You need node version 0.12 to run elm-test. For Travis CI this means that you should run
nvm install 0.12 prior to running elm-test or it will crash with a TypeError.

I think I got it going now with this .travis.yml.
Reply all
Reply to author
Forward
0 new messages