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

fix(isBIC): add XK to accepted BIC country codes #2046

Merged
merged 7 commits into from
Feb 2, 2023

Conversation

import-brain
Copy link
Contributor

Adds the country code XK (Republic of Kosovo) to isBIC's allowed country codes

closes #2045

Checklist

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

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (6df1853) compared to base (6dba289).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2046   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          105       105           
  Lines         2334      2335    +1     
  Branches       586       586           
=========================================
+ Hits          2334      2335    +1     
Impacted Files Coverage Δ
src/lib/isBIC.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

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

Maybe extract the country code to its own variable instead of resolving it twice?

ST-DDT
ST-DDT previously approved these changes Sep 21, 2022
@JohnIrle
Copy link

JohnIrle commented Oct 1, 2022

Would it be better to add the country code to the Set of country codes in isISO21661Alpha2.js?

@WikiRik
Copy link
Member

WikiRik commented Oct 1, 2022

No, it's not part of that list. It's a special code used only for BIC (in the scope of this project)

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.

Could you add some tests for the XK BIC? Preferably some valid and invalid.

You can add them to the current test;

it('should validate BIC codes', () => {
test({
validator: 'isBIC',
valid: [
'SBICKEN1345',
'SBICKEN1',
'SBICKENY',
'SBICKEN1YYP',
],
invalid: [
'SBIC23NXXX',
'S23CKENXXXX',
'SBICKENXX',
'SBICKENXX9',
'SBICKEN13458',
'SBICKEN',
],
});
});

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.

Thanks!

Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contrib 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr ✅ LGTM ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isBIC country code does not accept XK
5 participants