-
Notifications
You must be signed in to change notification settings - Fork 5
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
Don't use ExUnit in production code #20
Conversation
This changes the use of `assert` to raise on `nil`, and removes the commented out asserts
It's OK, I think there's no need to test it since the check is only there to ensure that, in the rare event that the caller of this module is handling it wrong, a more obscure exception won't be produced in later stages of decoding - it is indeed an assertion. Now, for some reason CI isn't being triggered... I'm going to close and reopen the PR to see if that does it. |
Github has been playing up for me today, although their status page says nothing is wrong |
Ah, CI is failing because of the infamous test coverage threshold, which I can never get to 100 because of Elixir structs... we just need to set it in |
You can get structs to be covered by using them in pattern matches in tests, I'll push a commit with an example |
Those two commits have gotten me another 1% coverage locally |
Ohh, thanks for the tip! And for your contribution as well. I’ll merge it and tag a new version tomorrow if I get a chance; if not, later this week for sure. |
Closes #19 |
|
Thanks 🎉 |
This changes the use of
assert
to raise onnil
, and removes the commented out assertsI'm actually not sure what tests to write to get this to fail