extractNationalNumber.test.js 851 B

1234567891011121314151617181920212223
  1. "use strict";
  2. var _extractNationalNumber = _interopRequireDefault(require("./extractNationalNumber.js"));
  3. var _metadata = _interopRequireDefault(require("../metadata.js"));
  4. var _metadataMin = _interopRequireDefault(require("../../test/metadata/1.0.0/metadata.min.json"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  6. describe('extractNationalNumber', function () {
  7. it('should extract a national number when using old metadata', function () {
  8. var _oldMetadata = new _metadata["default"](_metadataMin["default"]);
  9. _oldMetadata.selectNumberingPlan('RU');
  10. (0, _extractNationalNumber["default"])('88005553535', _oldMetadata).should.deep.equal({
  11. nationalNumber: '8005553535',
  12. carrierCode: undefined
  13. });
  14. });
  15. });
  16. //# sourceMappingURL=extractNationalNumber.test.js.map