validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

test: split tests of large validators

Open WikiRik opened this issue 9 months ago • 2 comments

Like in #2159 this PR splits tests of validators to their separate files. Based on https://github.com/validatorjs/validator.js/pull/2159#pullrequestreview-1288528413 this PR tackles validators that have > 100 loc. Only isMobilePhone was not done here because of the 50+ open PRs for it.

I also ran prettier on the split test files so there are some styling changes.

Checklist

  • [X] PR contains only changes related; no stray files, etc.
  • [X] README updated (where applicable)
  • [X] Tests written (where applicable)
  • [X] References provided in PR (where applicable)

WikiRik avatar Mar 28 '25 23:03 WikiRik

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.96%. Comparing base (0a39bb7) to head (b564f40).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2541   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files         113      113           
  Lines        2527     2527           
  Branches      641      641           
=======================================
  Hits         2526     2526           
  Partials        1        1           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Apr 08 '25 17:04 codecov[bot]

Had to fix merge conflicts in regards to the recently merged isPostalCode changes

WikiRik avatar Apr 08 '25 17:04 WikiRik