UNPKG

700 BJavaScriptView Raw
1import examples from '../examples.mobile';
2import metadata from '../metadata.min';
3import getExampleNumber from './getExampleNumber';
4describe('getExampleNumber', function () {
5 it('should get an example number', function () {
6 var phoneNumber = getExampleNumber('RU', examples, metadata);
7 phoneNumber.nationalNumber.should.equal('9123456789');
8 phoneNumber.number.should.equal('+79123456789');
9 phoneNumber.countryCallingCode.should.equal('7');
10 phoneNumber.country.should.equal('RU');
11 });
12 it('should handle a non-existing country', function () {
13 expect(getExampleNumber('XX', examples, metadata)).to.be.undefined;
14 });
15});
16//# sourceMappingURL=getExampleNumber.test.js.map
\No newline at end of file