parse.test.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. "use strict";
  2. var _metadataMin = _interopRequireDefault(require("../metadata.min.json"));
  3. var _parse = _interopRequireDefault(require("./parse.js"));
  4. var _metadata = _interopRequireDefault(require("./metadata.js"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  6. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  7. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  8. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  9. function parseNumber() {
  10. for (var _len = arguments.length, parameters = new Array(_len), _key = 0; _key < _len; _key++) {
  11. parameters[_key] = arguments[_key];
  12. }
  13. if (parameters.length < 2) {
  14. // `options` parameter.
  15. parameters.push(undefined);
  16. } // Convert default country argument to an `options` object.
  17. if (typeof parameters[1] === 'string') {
  18. parameters[1] = _objectSpread(_objectSpread({}, parameters[2]), {}, {
  19. defaultCountry: parameters[1]
  20. });
  21. }
  22. if (parameters[2]) {
  23. parameters[2] = _metadataMin["default"];
  24. } else {
  25. parameters.push(_metadataMin["default"]);
  26. }
  27. return _parse["default"].apply(this, parameters);
  28. }
  29. var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
  30. describe('parse', function () {
  31. it('should not parse invalid phone numbers', function () {
  32. // Too short.
  33. parseNumber('+7 (800) 55-35-35').should.deep.equal({}); // Too long.
  34. parseNumber('+7 (800) 55-35-35-55').should.deep.equal({});
  35. parseNumber('+7 (800) 55-35-35', 'US').should.deep.equal({});
  36. parseNumber('(800) 55 35 35', {
  37. defaultCountry: 'RU'
  38. }).should.deep.equal({});
  39. parseNumber('+1 187 215 5230', 'US').should.deep.equal({});
  40. parseNumber('911231231', 'BE').should.deep.equal({});
  41. });
  42. it('should parse valid phone numbers', function () {
  43. // Instant loans
  44. // https://www.youtube.com/watch?v=6e1pMrYH5jI
  45. //
  46. // Restrict to RU
  47. parseNumber('Phone: 8 (800) 555 35 35.', 'RU').should.deep.equal({
  48. country: 'RU',
  49. phone: '8005553535'
  50. }); // International format
  51. parseNumber('Phone: +7 (800) 555-35-35.').should.deep.equal({
  52. country: 'RU',
  53. phone: '8005553535'
  54. }); // // Restrict to US, but not a US country phone code supplied
  55. // parseNumber('+7 (800) 555-35-35', 'US').should.deep.equal({})
  56. // Restrict to RU
  57. parseNumber('(800) 555 35 35', 'RU').should.deep.equal({
  58. country: 'RU',
  59. phone: '8005553535'
  60. }); // Default to RU
  61. parseNumber('8 (800) 555 35 35', {
  62. defaultCountry: 'RU'
  63. }).should.deep.equal({
  64. country: 'RU',
  65. phone: '8005553535'
  66. }); // Gangster partyline
  67. parseNumber('+1-213-373-4253').should.deep.equal({
  68. country: 'US',
  69. phone: '2133734253'
  70. }); // Switzerland (just in case)
  71. parseNumber('044 668 18 00', 'CH').should.deep.equal({
  72. country: 'CH',
  73. phone: '446681800'
  74. }); // China, Beijing
  75. parseNumber('010-852644821', 'CN').should.deep.equal({
  76. country: 'CN',
  77. phone: '10852644821'
  78. }); // France
  79. parseNumber('+33169454850').should.deep.equal({
  80. country: 'FR',
  81. phone: '169454850'
  82. }); // UK (Jersey)
  83. parseNumber('+44 7700 300000').should.deep.equal({
  84. country: 'JE',
  85. phone: '7700300000'
  86. }); // KZ
  87. parseNumber('+7 702 211 1111').should.deep.equal({
  88. country: 'KZ',
  89. phone: '7022111111'
  90. }); // Brazil
  91. parseNumber('11987654321', 'BR').should.deep.equal({
  92. country: 'BR',
  93. phone: '11987654321'
  94. }); // Long country phone code.
  95. parseNumber('+212659777777').should.deep.equal({
  96. country: 'MA',
  97. phone: '659777777'
  98. }); // No country could be derived.
  99. // parseNumber('+212569887076').should.deep.equal({ countryPhoneCode: '212', phone: '569887076' })
  100. // GB. Moible numbers starting 07624* are Isle of Man.
  101. parseNumber('07624369230', 'GB').should.deep.equal({
  102. country: 'IM',
  103. phone: '7624369230'
  104. });
  105. });
  106. it('should parse possible numbers', function () {
  107. // Invalid phone number for a given country.
  108. parseNumber('1112223344', 'RU', {
  109. extended: true
  110. }).should.deep.equal({
  111. country: 'RU',
  112. countryCallingCode: '7',
  113. phone: '1112223344',
  114. carrierCode: undefined,
  115. ext: undefined,
  116. valid: false,
  117. possible: true
  118. }); // International phone number.
  119. // Several countries with the same country phone code.
  120. parseNumber('+71112223344').should.deep.equal({});
  121. parseNumber('+71112223344', {
  122. extended: true
  123. }).should.deep.equal({
  124. country: undefined,
  125. countryCallingCode: '7',
  126. phone: '1112223344',
  127. carrierCode: undefined,
  128. ext: undefined,
  129. valid: false,
  130. possible: true
  131. }); // International phone number.
  132. // Single country with the given country phone code.
  133. parseNumber('+33011222333', {
  134. extended: true
  135. }).should.deep.equal({
  136. country: 'FR',
  137. countryCallingCode: '33',
  138. phone: '011222333',
  139. carrierCode: undefined,
  140. ext: undefined,
  141. valid: false,
  142. possible: true
  143. }); // Too short.
  144. // Won't strip national prefix `8` because otherwise the number would be too short.
  145. parseNumber('+7 (800) 55-35-35', {
  146. extended: true
  147. }).should.deep.equal({
  148. country: 'RU',
  149. countryCallingCode: '7',
  150. phone: '800553535',
  151. carrierCode: undefined,
  152. ext: undefined,
  153. valid: false,
  154. possible: false
  155. }); // Too long.
  156. parseNumber('+1 213 37342530', {
  157. extended: true
  158. }).should.deep.equal({
  159. country: undefined,
  160. countryCallingCode: '1',
  161. phone: '21337342530',
  162. carrierCode: undefined,
  163. ext: undefined,
  164. valid: false,
  165. possible: false
  166. }); // No national number to be parsed.
  167. parseNumber('+996', {
  168. extended: true
  169. }).should.deep.equal({// countryCallingCode : '996'
  170. }); // Valid number.
  171. parseNumber('+78005553535', {
  172. extended: true
  173. }).should.deep.equal({
  174. country: 'RU',
  175. countryCallingCode: '7',
  176. phone: '8005553535',
  177. carrierCode: undefined,
  178. ext: undefined,
  179. valid: true,
  180. possible: true
  181. }); // https://github.com/catamphetamine/libphonenumber-js/issues/211
  182. parseNumber('+966', {
  183. extended: true
  184. }).should.deep.equal({});
  185. parseNumber('+9664', {
  186. extended: true
  187. }).should.deep.equal({});
  188. parseNumber('+96645', {
  189. extended: true
  190. }).should.deep.equal({
  191. carrierCode: undefined,
  192. phone: '45',
  193. ext: undefined,
  194. country: 'SA',
  195. countryCallingCode: '966',
  196. possible: false,
  197. valid: false
  198. });
  199. });
  200. it('should parse non-European digits', function () {
  201. parseNumber('+١٢١٢٢٣٢٣٢٣٢').should.deep.equal({
  202. country: 'US',
  203. phone: '2122323232'
  204. });
  205. });
  206. it('should work in edge cases', function () {
  207. var thrower; // No input
  208. parseNumber('').should.deep.equal({}); // No country phone code
  209. parseNumber('+').should.deep.equal({}); // No country at all (non international number and no explicit country code)
  210. parseNumber('123').should.deep.equal({}); // No country metadata for this `require` country code
  211. thrower = function thrower() {
  212. return parseNumber('123', 'ZZ');
  213. };
  214. thrower.should["throw"]('Unknown country'); // No country metadata for this `default` country code
  215. thrower = function thrower() {
  216. return parseNumber('123', {
  217. defaultCountry: 'ZZ'
  218. });
  219. };
  220. thrower.should["throw"]('Unknown country'); // Invalid country phone code
  221. parseNumber('+210').should.deep.equal({}); // Invalid country phone code (extended parsing mode)
  222. parseNumber('+210', {
  223. extended: true
  224. }).should.deep.equal({}); // Too short of a number.
  225. parseNumber('1', 'US', {
  226. extended: true
  227. }).should.deep.equal({}); // Too long of a number.
  228. parseNumber('1111111111111111111', 'RU', {
  229. extended: true
  230. }).should.deep.equal({}); // Not a number.
  231. parseNumber('abcdefg', 'US', {
  232. extended: true
  233. }).should.deep.equal({}); // Country phone code beginning with a '0'
  234. parseNumber('+0123').should.deep.equal({}); // Barbados NANPA phone number
  235. parseNumber('+12460000000').should.deep.equal({
  236. country: 'BB',
  237. phone: '2460000000'
  238. }); // // A case when country (restricted to) is not equal
  239. // // to the one parsed out of an international number.
  240. // parseNumber('+1-213-373-4253', 'RU').should.deep.equal({})
  241. // National (significant) number too short
  242. parseNumber('2', 'US').should.deep.equal({}); // National (significant) number too long
  243. parseNumber('222222222222222222', 'US').should.deep.equal({}); // No `national_prefix_for_parsing`
  244. parseNumber('41111', 'AC').should.deep.equal({
  245. country: 'AC',
  246. phone: '41111'
  247. }); // https://github.com/catamphetamine/libphonenumber-js/issues/235
  248. // `matchesEntirely()` bug fix.
  249. parseNumber('+4915784846111‬').should.deep.equal({
  250. country: 'DE',
  251. phone: '15784846111'
  252. }); // No metadata
  253. thrower = function thrower() {
  254. return (0, _parse["default"])('');
  255. };
  256. thrower.should["throw"]('`metadata` argument not passed'); // // Numerical `value`
  257. // thrower = () => parseNumber(2141111111, 'US')
  258. // thrower.should.throw('A text for parsing must be a string.')
  259. // Input string too long.
  260. parseNumber('8005553535 ', 'RU').should.deep.equal({});
  261. });
  262. it('should parse phone number extensions', function () {
  263. // "ext"
  264. parseNumber('2134567890 ext 123', 'US').should.deep.equal({
  265. country: 'US',
  266. phone: '2134567890',
  267. ext: '123'
  268. }); // "ext."
  269. parseNumber('+12134567890 ext. 12345', 'US').should.deep.equal({
  270. country: 'US',
  271. phone: '2134567890',
  272. ext: '12345'
  273. }); // "доб."
  274. parseNumber('+78005553535 доб. 1234', 'RU').should.deep.equal({
  275. country: 'RU',
  276. phone: '8005553535',
  277. ext: '1234'
  278. }); // "#"
  279. parseNumber('+12134567890#1234').should.deep.equal({
  280. country: 'US',
  281. phone: '2134567890',
  282. ext: '1234'
  283. }); // "x"
  284. parseNumber('+78005553535 x1234').should.deep.equal({
  285. country: 'RU',
  286. phone: '8005553535',
  287. ext: '1234'
  288. }); // Not a valid extension
  289. parseNumber('2134567890 ext. abc', 'US').should.deep.equal({
  290. country: 'US',
  291. phone: '2134567890'
  292. });
  293. });
  294. it('should parse RFC 3966 phone numbers', function () {
  295. parseNumber('tel:+78005553535;ext=123').should.deep.equal({
  296. country: 'RU',
  297. phone: '8005553535',
  298. ext: '123'
  299. }); // Should parse "visual separators".
  300. parseNumber('tel:+7(800)555-35.35;ext=123').should.deep.equal({
  301. country: 'RU',
  302. phone: '8005553535',
  303. ext: '123'
  304. }); // Invalid number.
  305. parseNumber('tel:+7x8005553535;ext=123').should.deep.equal({});
  306. });
  307. it('should parse invalid international numbers even if they are invalid', function () {
  308. parseNumber('+7(8)8005553535', 'RU').should.deep.equal({
  309. country: 'RU',
  310. phone: '8005553535'
  311. });
  312. });
  313. it('should parse carrier codes', function () {
  314. parseNumber('0 15 21 5555-5555', 'BR', {
  315. extended: true
  316. }).should.deep.equal({
  317. country: 'BR',
  318. countryCallingCode: '55',
  319. phone: '2155555555',
  320. carrierCode: '15',
  321. ext: undefined,
  322. valid: true,
  323. possible: true
  324. });
  325. });
  326. it('should parse IDD prefixes', function () {
  327. parseNumber('011 61 2 3456 7890', 'US').should.deep.equal({
  328. phone: '234567890',
  329. country: 'AU'
  330. });
  331. parseNumber('011 61 2 3456 7890', 'FR').should.deep.equal({});
  332. parseNumber('00 61 2 3456 7890', 'US').should.deep.equal({});
  333. parseNumber('810 61 2 3456 7890', 'RU').should.deep.equal({
  334. phone: '234567890',
  335. country: 'AU'
  336. });
  337. });
  338. it('should work with v2 API', function () {
  339. parseNumber('+99989160151539');
  340. });
  341. it('should work with Argentina numbers', function () {
  342. // The same mobile number is written differently
  343. // in different formats in Argentina:
  344. // `9` gets prepended in international format.
  345. parseNumber('+54 9 3435 55 1212').should.deep.equal({
  346. country: 'AR',
  347. phone: '93435551212'
  348. });
  349. parseNumber('0343 15-555-1212', 'AR').should.deep.equal({
  350. country: 'AR',
  351. phone: '93435551212'
  352. });
  353. });
  354. it('should work with Mexico numbers', function () {
  355. // Fixed line.
  356. parseNumber('+52 449 978 0001').should.deep.equal({
  357. country: 'MX',
  358. phone: '4499780001'
  359. });
  360. parseNumber('01 (449)978-0001', 'MX').should.deep.equal({
  361. country: 'MX',
  362. phone: '4499780001'
  363. });
  364. parseNumber('(449)978-0001', 'MX').should.deep.equal({
  365. country: 'MX',
  366. phone: '4499780001'
  367. }); // Mobile.
  368. // `1` is prepended before area code to mobile numbers in international format.
  369. parseNumber('+52 1 33 1234-5678', 'MX').should.deep.equal({
  370. country: 'MX',
  371. phone: '3312345678'
  372. });
  373. parseNumber('+52 33 1234-5678', 'MX').should.deep.equal({
  374. country: 'MX',
  375. phone: '3312345678'
  376. });
  377. parseNumber('044 (33) 1234-5678', 'MX').should.deep.equal({
  378. country: 'MX',
  379. phone: '3312345678'
  380. });
  381. parseNumber('045 33 1234-5678', 'MX').should.deep.equal({
  382. country: 'MX',
  383. phone: '3312345678'
  384. });
  385. });
  386. it('should parse non-geographic numbering plan phone numbers', function () {
  387. parseNumber('+870773111632').should.deep.equal(USE_NON_GEOGRAPHIC_COUNTRY_CODE ? {
  388. country: '001',
  389. phone: '773111632'
  390. } : {});
  391. });
  392. it('should parse non-geographic numbering plan phone numbers (default country code)', function () {
  393. parseNumber('773111632', {
  394. defaultCallingCode: '870'
  395. }).should.deep.equal(USE_NON_GEOGRAPHIC_COUNTRY_CODE ? {
  396. country: '001',
  397. phone: '773111632'
  398. } : {});
  399. });
  400. it('should parse non-geographic numbering plan phone numbers (extended)', function () {
  401. parseNumber('+870773111632', {
  402. extended: true
  403. }).should.deep.equal({
  404. country: USE_NON_GEOGRAPHIC_COUNTRY_CODE ? '001' : undefined,
  405. countryCallingCode: '870',
  406. phone: '773111632',
  407. carrierCode: undefined,
  408. ext: undefined,
  409. possible: true,
  410. valid: true
  411. });
  412. });
  413. it('should parse non-geographic numbering plan phone numbers (default country code) (extended)', function () {
  414. parseNumber('773111632', {
  415. defaultCallingCode: '870',
  416. extended: true
  417. }).should.deep.equal({
  418. country: USE_NON_GEOGRAPHIC_COUNTRY_CODE ? '001' : undefined,
  419. countryCallingCode: '870',
  420. phone: '773111632',
  421. carrierCode: undefined,
  422. ext: undefined,
  423. possible: true,
  424. valid: true
  425. });
  426. });
  427. it('shouldn\'t crash when invalid `defaultCallingCode` is passed', function () {
  428. expect(function () {
  429. return parseNumber('773111632', {
  430. defaultCallingCode: '999'
  431. });
  432. }).to["throw"]('Unknown calling code');
  433. });
  434. it('shouldn\'t set `country` when there\'s no `defaultCountry` and `defaultCallingCode` is not of a "non-geographic entity"', function () {
  435. parseNumber('88005553535', {
  436. defaultCallingCode: '7'
  437. }).should.deep.equal({
  438. country: 'RU',
  439. phone: '8005553535'
  440. });
  441. });
  442. it('should correctly parse numbers starting with the same digit as the national prefix', function () {
  443. // https://github.com/catamphetamine/libphonenumber-js/issues/373
  444. // `BY`'s `national_prefix` is `8`.
  445. parseNumber('+37582004910060').should.deep.equal({
  446. country: 'BY',
  447. phone: '82004910060'
  448. });
  449. });
  450. it('should autocorrect numbers without a leading +', function () {
  451. // https://github.com/catamphetamine/libphonenumber-js/issues/376
  452. parseNumber('375447521111', 'BY').should.deep.equal({
  453. country: 'BY',
  454. phone: '447521111'
  455. }); // https://github.com/catamphetamine/libphonenumber-js/issues/316
  456. parseNumber('33612902554', 'FR').should.deep.equal({
  457. country: 'FR',
  458. phone: '612902554'
  459. }); // https://github.com/catamphetamine/libphonenumber-js/issues/375
  460. parseNumber('61438331999', 'AU').should.deep.equal({
  461. country: 'AU',
  462. phone: '438331999'
  463. }); // A case when `49` is a country calling code of a number without a leading `+`.
  464. parseNumber('4930123456', 'DE').should.deep.equal({
  465. country: 'DE',
  466. phone: '30123456'
  467. }); // A case when `49` is a valid area code.
  468. parseNumber('4951234567890', 'DE').should.deep.equal({
  469. country: 'DE',
  470. phone: '4951234567890'
  471. });
  472. });
  473. it('should parse extensions (long extensions with explicitl abels)', function () {
  474. // Test lower and upper limits of extension lengths for each type of label.
  475. // Firstly, when in RFC format: PhoneNumberUtil.extLimitAfterExplicitLabel
  476. parseNumber('33316005 ext 0', 'NZ').ext.should.equal('0');
  477. parseNumber('33316005 ext 01234567890123456789', 'NZ').ext.should.equal('01234567890123456789'); // Extension too long.
  478. expect(parseNumber('33316005 ext 012345678901234567890', 'NZ').ext).to.be.undefined; // Explicit extension label.
  479. parseNumber('03 3316005ext:1', 'NZ').ext.should.equal('1');
  480. parseNumber('03 3316005 xtn:12345678901234567890', 'NZ').ext.should.equal('12345678901234567890');
  481. parseNumber('03 3316005 extension\t12345678901234567890', 'NZ').ext.should.equal('12345678901234567890');
  482. parseNumber('03 3316005 xtensio:12345678901234567890', 'NZ').ext.should.equal('12345678901234567890');
  483. parseNumber('03 3316005 xtensión, 12345678901234567890#', 'NZ').ext.should.equal('12345678901234567890');
  484. parseNumber('03 3316005extension.12345678901234567890', 'NZ').ext.should.equal('12345678901234567890');
  485. parseNumber('03 3316005 доб:12345678901234567890', 'NZ').ext.should.equal('12345678901234567890'); // Extension too long.
  486. expect(parseNumber('03 3316005 extension 123456789012345678901', 'NZ').ext).to.be.undefined;
  487. });
  488. it('should parse extensions (long extensions with auto dialling labels)', function () {
  489. parseNumber('+12679000000,,123456789012345#').ext.should.equal('123456789012345');
  490. parseNumber('+12679000000;123456789012345#').ext.should.equal('123456789012345');
  491. parseNumber('+442034000000,,123456789#').ext.should.equal('123456789'); // Extension too long.
  492. expect(parseNumber('+12679000000,,1234567890123456#').ext).to.be.undefined;
  493. });
  494. it('should parse extensions (short extensions with ambiguous characters)', function () {
  495. parseNumber('03 3316005 x 123456789', 'NZ').ext.should.equal('123456789');
  496. parseNumber('03 3316005 x. 123456789', 'NZ').ext.should.equal('123456789');
  497. parseNumber('03 3316005 #123456789#', 'NZ').ext.should.equal('123456789');
  498. parseNumber('03 3316005 ~ 123456789', 'NZ').ext.should.equal('123456789'); // Extension too long.
  499. expect(parseNumber('03 3316005 ~ 1234567890', 'NZ').ext).to.be.undefined;
  500. });
  501. it('should parse extensions (short extensions when not sure of label)', function () {
  502. parseNumber('+1123-456-7890 666666#', {
  503. v2: true
  504. }).ext.should.equal('666666');
  505. parseNumber('+11234567890-6#', {
  506. v2: true
  507. }).ext.should.equal('6'); // Extension too long.
  508. expect(function () {
  509. return parseNumber('+1123-456-7890 7777777#', {
  510. v2: true
  511. });
  512. }).to["throw"]('NOT_A_NUMBER');
  513. });
  514. it('should choose `defaultCountry` (non-"main" one) when multiple countries match the number', function () {
  515. // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103
  516. var phoneNumber = parseNumber('8004001000', {
  517. defaultCountry: 'CA',
  518. v2: true
  519. });
  520. phoneNumber.country.should.equal('CA');
  521. var phoneNumber2 = parseNumber('4389999999', {
  522. defaultCountry: 'US',
  523. v2: true
  524. });
  525. phoneNumber.country.should.equal('CA');
  526. });
  527. });
  528. //# sourceMappingURL=parse.test.js.map