Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

pixelbucket-dev
Copy link
Contributor

@pixelbucket-dev pixelbucket-dev commented Oct 25, 2022

This PR implements steps 1 and 2 of #1874 for isBefore and builds upon #2075.

This PR extracts tests for isBefore into a separate test file ⇾ test/validators/isBefore.test.js (inspired by #1793).

This PR also renames the proposed date option to comparisonDate, because it is more explicit. If verified, it should be implemented in #2075 as well.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@pixelbucket-dev pixelbucket-dev marked this pull request as ready for review October 25, 2022 14:08
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (f81d857) to head (8b02b7f).
Report is 28 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few remarks, thanks for working on this!

test/validators/isBefore.test.js Outdated Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
src/lib/toDate.js Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

src/lib/isBefore.js Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
src/lib/isBefore.js Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
@pixelbucket-dev pixelbucket-dev force-pushed the isBefore-options-refactor branch from b4167b7 to e907cde Compare January 3, 2023 20:25
@rubiin rubiin requested a review from WikiRik January 23, 2023 07:10
@WikiRik WikiRik added the 🧹 needs-update For PRs that need to be updated before landing label Jan 30, 2023
@pixelbucket-dev
Copy link
Contributor Author

I think this should be good to go :).

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few remarks to be more in line with how isAfter was done, but those should be my last

src/lib/isBefore.js Outdated Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
src/lib/isBefore.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
test/validators/isBefore.test.js Outdated Show resolved Hide resolved
WikiRik
WikiRik previously approved these changes Mar 26, 2025
@WikiRik WikiRik added the mc-to-land Just merge-conflict standing between the PR and landing. label Mar 26, 2025
@WikiRik WikiRik removed mc-to-land Just merge-conflict standing between the PR and landing. 🧹 needs-update For PRs that need to be updated before landing labels Mar 26, 2025
WikiRik
WikiRik previously approved these changes Mar 26, 2025
@WikiRik WikiRik requested a review from rubiin March 26, 2025 20:53
@rubiin rubiin merged commit 650a2fa into validatorjs:master Mar 27, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.