Closed floatas closed 5 years ago
+443
throws as too short, however this code isn't present in metadata.
+44
is UK
+370
throws invalid country, however this code is in metadata.
It doesn.t
Added screenshots, for me it looks like 370 is present in metadata or I'm looking to wrong file.
370
is present in metadata but the error it throws in the latest version is TOO_SHORT
.
The pull request you've sent — does it pass tests on your machine?
I updated my branch (restored +443 test).
But this test expect(() => parsePhoneNumber('+370')).to.throw('TOO_SHORT')
fails on master branch with expected [Function] to throw error including 'TOO_SHORT' but got 'ParseError: INVALID_COUNTRY'
@floatas Indeed, that was a bug.
Fixed in libphonenumber-js@1.7.29
.
Thank you 👍
Thank you 👍
Well, thank you too then )
+443
throws as too short, however this code isn't present in metadata.+370
throws invalid country, however this code is in metadata.Updated test according to my understanding.
Is this an issue or I misunderstood how library should work?