jest-extended
jest-extended copied to clipboard
add geo (toBeGeoLatitude, toBeGeoLongitude)
What
add geographic assertions (toBeGeoLatitude, toBeGeoLongitude)
Why
I've been using jest and jest-extended for long. Few months ago I needed to make geographic assertions to a project I was working on but I didn't found anything already done so I wrote some custom code in my project and later refactored and open sourced to a library (https://www.npmjs.com/package/check-geographic-coordinates). Other developers finded it useful and used it, some of them gave to me some feedbacks in how to improve it, but I was missing the most important one, the jest assertion syntax integration. So I decided to look at jest-exteded more in deep, not as the user I was, but as a developer and I made this PR. Looking backward I think I would used it directly with jest-extended.
I hope you like it and that you find useful for other developers too. I'm glad to receive any feedback from you. Thank you, Marco Verdecchia.
Notes
Assertions based on https://www.npmjs.com/package/check-geographic-coordinates
Housekeeping
- [x] Unit tests
- [x] Documentation is up to date
- [x] No additional lint warnings
- [x] Typescript definitions are added/updated where relevant
Codecov Report
Merging #538 (e6f3cab) into main (6fbb99e) will not change coverage. The diff coverage is
100.00%
.
:exclamation: Current head e6f3cab differs from pull request most recent head ce2ffa1. Consider uploading reports for the commit ce2ffa1 to get more accurate results
@@ Coverage Diff @@
## main #538 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 75 +2
Lines 673 685 +12
Branches 289 293 +4
=========================================
+ Hits 673 685 +12
Impacted Files | Coverage Ξ | |
---|---|---|
src/matchers/toBeGeoLatitude.js | 100.00% <100.00%> (ΓΈ) |
|
src/matchers/toBeGeoLongitude.js | 100.00% <100.00%> (ΓΈ) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@verdecchia could you resolve the conflict?