Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to elm-test 2.0 #96

Merged
merged 4 commits into from
Aug 17, 2016
Merged

Update to elm-test 2.0 #96

merged 4 commits into from
Aug 17, 2016

Conversation

tgecho
Copy link
Contributor

@tgecho tgecho commented Aug 14, 2016

This is an example of what an exercise upgraded to elm-test 2.0 looks like (fixes #95). Among other highlights, I've reenabled the node elm-test runner workflow (npm install -g elm-test) as before, so the output is much nicer and by ditching the runtests scripts we can close #76.

  • Update the rest of the exercises
  • Update the installation/running docs
  • Get a 👍 from at least one other human being

@tgecho tgecho changed the title WIP: Update to elm-test 2.0 Update to elm-test 2.0 Aug 14, 2016
[ test "[]] Accumulate"
(assertEqual [] (accumulate square []))
(\() -> Expect.equal [] (accumulate square []))
Copy link
Member

@lpil lpil Aug 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this syntax is the convention the Elm Test community are trying to promote:

test "square Accumulate" <|
    \() -> 
        accumulate square [ 1, 2, 3 ]
            |> Expect.equal [ 1, 4, 9 ] 

I recognise this is probably hard to change without lots of busy work though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... To be honest I was able to do 99% of this via regex flavored find/replace because I was keeping the existing closing paren at the end of each test. Switching to that style will require a bit more work. That's really my strongest objection :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do it, but perhaps it's something we can leave for a later pull request, or just do incrementally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, you got me. I figured how to get 95% of it in bulk, and elm-format helped me sort out the rest pretty quickly.

@lpil
Copy link
Member

lpil commented Aug 14, 2016

I like where this is going so far :)

Do we run Elm Format on the exercises?

@tgecho
Copy link
Contributor Author

tgecho commented Aug 14, 2016

Not in CI. There's an issue for that (#47), but no one has bothered to try installing it in Travis yet.

@tgecho
Copy link
Contributor Author

tgecho commented Aug 16, 2016

Anyone have any objections to merging this (squashed, etc...)? @lpil @parkerl @lukewestby

@lpil
Copy link
Member

lpil commented Aug 17, 2016

Looks great! Thank you for doing all this work.

@tgecho tgecho merged commit 54e3017 into exercism:master Aug 17, 2016
@tgecho tgecho deleted the elm-test-2.0 branch August 23, 2016 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to use the latest version of Elm Test runtests.sh is not downloaded with executable permissions
2 participants