test: Fix typo in validators.test.js by camillobruni · Pull Request #2581 · validatorjs/validator.js
Use locale: instead of local: for isPhoneNumber test.
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)
- References provided in PR (where applicable)
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (abcc8ec) to head (9049b6f).
⚠️ Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #2581 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 114 114 Lines 2535 2535 Branches 641 641 ========================================= Hits 2535 2535
☔ 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.
Good catch! However this should have been an error in the test runs before, I'll look into why we haven't implemented such a check
From what I understood this just goes into the "any" fallback, maybe the invalid phone numbers are accidentally "globally" invalid?
From what I understood this just goes into the
"any"fallback, maybe the invalid phone numbers are accidentally "globally" invalid?
Yes, something like that seems to be happening indeed. I've added a check locally for other unexpected attributes in that fixtures array but those seem good. When we do a bigger update to the test helper functions I'll add that (or when we move to TypeScript). For now this change is fine to merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters