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 regex matching in GetLengthOfNationalDestinationCode #150

Conversation

hemachandran-kalaimani
Copy link
Contributor

Different to the regex in JAVA implementation.

Refer to issue #147

@@ -822,13 +822,13 @@ func TestGetLengthOfGeographicalAreaCode(t *testing.T) {
numName string
length int
}{
{numName: "US_NUMBER", length: 3},
{numName: "US_NUMBER", length: 1},
Copy link
Member

Choose a reason for hiding this comment

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

isn't this wrong now... US area codes are 3 digits, UK are 2 etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that seems definitely wrong, let me investigate it and compare with the Java version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, found the issue comparing the whole method -reverted my unit test changes and updated the method to match the latest JAVA version of the library.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (85be252) 49.66% compared to head (1ac248f) 49.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   49.66%   49.66%           
=======================================
  Files           9        9           
  Lines        3304     3304           
=======================================
  Hits         1641     1641           
  Misses       1521     1521           
  Partials      142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rowanseymour rowanseymour merged commit 6096ac3 into nyaruka:main Nov 17, 2023
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