Uh oh!
There was an error while loading. Please reload this page.
feat(isBefore): allow usage of options object - #2088
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## master #2088 +/- ##
===========================================
- Coverage 100.00% 99.96% -0.04%
===========================================
Files 110 113 +3 Lines 2510 2531 +21 Branches 633 643 +10 ===========================================
+ Hits 2510 2530 +20 - Partials 0 1 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WikiRik
left a comment
There was a problem hiding this comment.
Few remarks, thanks for working on this!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
WikiRik
left a comment
There was a problem hiding this comment.
Few final comments so that this is consistent with my changes to isAfter and the project in general, but apart from these we should be good I think
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b4167b7 to
e907cdeComparepixelbucket-dev
commented
Feb 5, 2023
I think this should be good to go :). |
WikiRik
left a comment
There was a problem hiding this comment.
Few remarks to be more in line with how isAfter was done, but those should be my last
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* refactor: allow for splitting tests to different files * feat(isAfter): allow usage of options object * style: make options italic * refactor: rename test file extension to .test.js * refactor: rename test-functions to testFunctions * refactor: implement suggestion from validatorjs#2019 review * refactor: remove custom repeat to use native function * refactor: implement suggestion new Date * Refactor isBefore with options API * Refactor isBefore tests * Refactor to simplify logic * Update README * Refactor logic * Improve README formatting * Fix backwards-compat * Remove redundant string assertion * Fix comment * Reinstate legacy tests * Change arg name according to code review * Add line break according to code review * Revert change of simplifying toDate * Fix whitespace issues * Fix test * Fix tests * Format file for consistency with isBefore * Remove redundant file * Remove old tests * Add tests for undefined args * Remove arguments: linter error * Improve comment * Use recommended variable name * Improve readme text according to code review * Make isAfter arguments more robust * Split test cases into given and default end date --------- Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
* refactor: allow for splitting tests to different files * feat(isAfter): allow usage of options object * style: make options italic * refactor: rename test file extension to .test.js * refactor: rename test-functions to testFunctions * refactor: implement suggestion from validatorjs#2019 review * refactor: remove custom repeat to use native function * refactor: implement suggestion new Date * Refactor isBefore with options API * Refactor isBefore tests * Refactor to simplify logic * Update README * Refactor logic * Improve README formatting * Fix backwards-compat * Remove redundant string assertion * Fix comment * Reinstate legacy tests * Change arg name according to code review * Add line break according to code review * Revert change of simplifying toDate * Fix whitespace issues * Fix test * Fix tests * Format file for consistency with isBefore * Remove redundant file * Remove old tests * Add tests for undefined args * Remove arguments: linter error * Improve comment * Use recommended variable name * Improve readme text according to code review * Make isAfter arguments more robust * Split test cases into given and default end date --------- Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
* refactor: allow for splitting tests to different files * feat(isAfter): allow usage of options object * style: make options italic * refactor: rename test file extension to .test.js * refactor: rename test-functions to testFunctions * refactor: implement suggestion from validatorjs#2019 review * refactor: remove custom repeat to use native function * refactor: implement suggestion new Date * Refactor isBefore with options API * Refactor isBefore tests * Refactor to simplify logic * Update README * Refactor logic * Improve README formatting * Fix backwards-compat * Remove redundant string assertion * Fix comment * Reinstate legacy tests * Change arg name according to code review * Add line break according to code review * Revert change of simplifying toDate * Fix whitespace issues * Fix test * Fix tests * Format file for consistency with isBefore * Remove redundant file * Remove old tests * Add tests for undefined args * Remove arguments: linter error * Improve comment * Use recommended variable name * Improve readme text according to code review * Make isAfter arguments more robust * Split test cases into given and default end date --------- Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
This PR implements steps 1 and 2 of #1874 for
isBeforeand builds upon #2075.This PR extracts tests for
isBeforeinto a separate test file ⇾test/validators/isBefore.test.js(inspired by #1793).This PR also renames the proposed
dateoption tocomparisonDate, because it is more explicit. If verified, it should be implemented in #2075 as well.Checklist