Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(finance): update mastercard patterns and test #2396

Merged
merged 9 commits into from
Sep 29, 2023

Conversation

matthewmayer
Copy link
Contributor

See
#2350 (comment)

Updates the mastercard patterns to remove the weird 677189... pattern
which is identified as a unionpay card, and instead add the much more
common patterns starting 2221 – 2720 which were introduced in 2017
https://www.cardfellow.com/blog/new-mastercard-bins/

Following this change, all mastercard card numbers pass validator's
isCreditCard
check, so switch to using that instead of a custom regex

@matthewmayer matthewmayer requested a review from a team as a code owner September 16, 2023 04:40
@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Merging #2396 (f20bd79) into next (c498c09) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2396      +/-   ##
==========================================
- Coverage   99.61%   99.60%   -0.01%     
==========================================
  Files        2802     2802              
  Lines      252492   252492              
  Branches     1103     1103              
==========================================
- Hits       251516   251500      -16     
- Misses        949      965      +16     
  Partials       27       27              
Files Coverage Δ
src/locales/el/finance/credit_card/mastercard.ts 100.00% <100.00%> (ø)
src/locales/en/finance/credit_card/mastercard.ts 100.00% <100.00%> (ø)
src/locales/fa/finance/credit_card/mastercard.ts 100.00% <100.00%> (ø)
...rc/locales/zh_CN/finance/credit_card/mastercard.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@ST-DDT
Copy link
Member

ST-DDT commented Sep 17, 2023

@ST-DDT ST-DDT added this to the vAnytime milestone Sep 17, 2023
@ST-DDT ST-DDT added c: chore PR that doesn't affect the runtime behavior p: 1-normal Nothing urgent m: finance Something is referring to the finance module labels Sep 17, 2023
@ST-DDT ST-DDT requested review from a team September 18, 2023 20:26
@ST-DDT ST-DDT merged commit dd21c0f into faker-js:next Sep 29, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior m: finance Something is referring to the finance module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants