1 | import examples from '../examples.mobile';
|
2 | import metadata from '../metadata.min';
|
3 | import getExampleNumber from './getExampleNumber';
|
4 | describe('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 |
|
\ | No newline at end of file |