-
-
Notifications
You must be signed in to change notification settings - Fork 158
Refactor Check unit tests #421
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
Conversation
1d06e83 to
990b095
Compare
Codecov Report
@@ Coverage Diff @@
## master #421 +/- ##
==========================================
- Coverage 99.01% 98.97% -0.05%
==========================================
Files 38 38
Lines 2746 2634 -112
==========================================
- Hits 2719 2607 -112
Misses 27 27
Continue to review full report at Codecov.
|
990b095 to
3d88c8c
Compare
|
I've just updated this PR to take into account the recently merged #414 🎉 |
|
@mc1098 👋 Thank you for your contribution 👍 Sorry, I'm quite busy now, so I'll try to review your PR by the end of the week 🙁 |
check_tester macro helps to remove the boiler plate when testing the impls of the Check trait.
Internal documentation for the check_tester macro to make it easier to understand and use with some examples.
Refactors SubstitutionKeyChecker unit tests to use the check_tester macro inline with the other Check impls.
3d88c8c to
5b362f8
Compare
Replaces the check_tester! declarative macro with a generic test helper function. This will be more explicit and easier to update than the check_tester macro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the great job! 🚀
|
@mc1098 Please add your changes to the CHANGELOG.md file 🙂 |
Updates the changelog to include the changes made in the PR dotenv-linter#421.
Fixes the 'inconsistent-struct-constructor' clippy warning.
|
@mc1098 Thank you for your help 🔥 🙏 If it’s not difficult for you, please support the project - star on GitHub ⭐️ |
Refactors the unit tests for Check implementations as per #419.
Unit tests have been replaced with a new check_tester macro which takes care of the boiler plate of writing multiple test cases. This would make the tests easier to change when an interface change is required, such as #410, as only the expanded code of the macro is changed to reflect the new API.
This change would also effect #414 and once that PR is merged I'm happy to make the changes so that it is included in this refactoring :)
Closes #419
✔ Checklist: