Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd test for customDecoder messages and fix typo in messages #666
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Jul 15, 2016
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Jul 15, 2016
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jul 15, 2016
Member
Looks good. Can you make the test use String.contains though? I don't think it makes sense to encode the particular wording of the error message in the test, but it does make sense to make sure the users messages appears somewhere in the error message.
|
Looks good. Can you make the test use |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Sounds better. On it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
noahzgordon
Jul 15, 2016
Contributor
Updated with your suggestion.
It gets a bit funky when testing anything but equality for Err values, since to operate on the Err string you have to pattern match and then handle the possibility of Ok values. I've handled this in my projects my using Debug.crash to raise with an informative message on the Ok branch, so that's what I've done here. Let me know if you've found a better solution.
|
Updated with your suggestion. It gets a bit funky when testing anything but equality for Err values, since to operate on the Err string you have to pattern match and then handle the possibility of Ok values. I've handled this in my projects my using |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Cool, didn't know about those functions. Updated to use |
evancz
merged commit 2f6c2ae
into
elm:master
Jul 16, 2016
1 check passed
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
First commits to core! |
noahzgordon commentedJul 15, 2016
#639 was closed because @evancz came across the same issue and fixed it in the same way, adding some useful context information. This PR extends the test from #639 to fit his implementation. It also changes the error message to use the function name
customDecoder, which was misspelled as @jvoigtlaender points out in elm-lang@7f6e518