Correctly compare dates for PR retrieval; fix tests
The logic for comparing dates tries to compare a string to a Date object. This causes additional pages of PRs to never be retrieved. This has been fixed.
Also, constructing a date used the local-specific date instead of UTC, which means that the tests would only pass if one ran them from a UTC timezone. The code was corrected to build the dates using UTC.
I found this problem when working on https://github.com/node-saml/passport-saml/issues/597
Codecov Report
Merging #301 (960dbb2) into master (d7ad51a) will decrease coverage by
0.19%. The diff coverage is10.00%.
:exclamation: Current head 960dbb2 differs from pull request most recent head 0b306da. Consider uploading reports for the commit 0b306da to get more accurate results
@@ Coverage Diff @@
## master #301 +/- ##
==========================================
- Coverage 39.08% 38.88% -0.20%
==========================================
Files 8 8
Lines 394 396 +2
==========================================
Hits 154 154
- Misses 240 242 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/src/Gren.js | 4.72% <0.00%> (-0.05%) |
:arrow_down: |
| lib/src/_utils.js | 95.71% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update ff0ddae...0b306da. Read the comment docs.
@alexcanessa , would you be able to take a quick look at this PR? This issue affects node-saml and passport-saml, and I'd love to get this fix landed and released. If there is anything I can do to help the process along, please let me know.