{"version":3,"file":"validatePhoneNumberLength.test.js","names":["_validatePhoneNumberLength","metadata","type","validatePhoneNumberLength","parameters","push","apply","describe","it","should","equal","expect","to","be","undefined"],"sources":["../source/validatePhoneNumberLength.test.js"],"sourcesContent":["import _validatePhoneNumberLength from './validatePhoneNumberLength.js'\r\nimport metadata from '../metadata.min.json' assert { type: 'json' }\r\n\r\nfunction validatePhoneNumberLength(...parameters) {\r\n\tparameters.push(metadata)\r\n\treturn _validatePhoneNumberLength.apply(this, parameters)\r\n}\r\n\r\ndescribe('validatePhoneNumberLength', () => {\r\n\tit('should detect whether a phone number length is valid', () => {\r\n\t\t// Not a phone number.\r\n\t\tvalidatePhoneNumberLength('+').should.equal('NOT_A_NUMBER')\r\n\t\tvalidatePhoneNumberLength('abcde').should.equal('NOT_A_NUMBER')\r\n\r\n\t\t// No country supplied for a national number.\r\n\t\tvalidatePhoneNumberLength('123').should.equal('INVALID_COUNTRY')\r\n\r\n\t\t// Too short while the number is not considered \"viable\"\r\n\t\t// by Google's `libphonenumber`.\r\n\t\tvalidatePhoneNumberLength('2', 'US').should.equal('TOO_SHORT')\r\n\t\tvalidatePhoneNumberLength('+1', 'US').should.equal('TOO_SHORT')\r\n\t\tvalidatePhoneNumberLength('+12', 'US').should.equal('TOO_SHORT')\r\n\r\n\t\t// Test national (significant) number length.\r\n\t\tvalidatePhoneNumberLength('444 1 44', 'TR').should.equal('TOO_SHORT')\r\n\t\texpect(validatePhoneNumberLength('444 1 444', 'TR')).to.be.undefined\r\n\t\tvalidatePhoneNumberLength('444 1 4444', 'TR').should.equal('INVALID_LENGTH')\r\n\t\tvalidatePhoneNumberLength('444 1 4444444444', 'TR').should.equal('TOO_LONG')\r\n\t})\r\n})"],"mappings":"AAAA,OAAOA,0BAAP,MAAuC,gCAAvC;AACA,OAAOC,QAAP,MAAqB,sBAArB,UAAqDC,IAAI,EAAE,MAA3D;;AAEA,SAASC,yBAAT,GAAkD;EAAA,kCAAZC,UAAY;IAAZA,UAAY;EA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