import _parsePhoneNumberFromString from './parsePhoneNumberFromString';
import metadata from '../metadata.min.json';

function parsePhoneNumberFromString() {
  for (var _len = arguments.length, parameters = new Array(_len), _key = 0; _key < _len; _key++) {
    parameters[_key] = arguments[_key];
  }

  parameters.push(metadata);
  return _parsePhoneNumberFromString.apply(this, parameters);
}

describe('parsePhoneNumberFromString', function () {
  it('should parse phone numbers from string', function () {
    parsePhoneNumberFromString('Phone: 8 (800) 555 35 35.', 'RU').nationalNumber.should.equal('8005553535');
    expect(parsePhoneNumberFromString('3', 'RU')).to.be.undefined;
  });
  it('should work in edge cases', function () {
    expect(parsePhoneNumberFromString('')).to.be.undefined;
  });
  it('should parse phone numbers when invalid country code is passed', function () {
    parsePhoneNumberFromString('Phone: +7 (800) 555 35 35.', 'XX').nationalNumber.should.equal('8005553535');
    expect(parsePhoneNumberFromString('Phone: 8 (800) 555-35-35.', 'XX')).to.be.undefined;
  });
});
//# sourceMappingURL=parsePhoneNumberFromString.test.js.map