UNPKG

@botique/libphonenumber-js

Version:

A simpler (and smaller) rewrite of Google Android's popular libphonenumber library

24 lines (20 loc) 725 B
import _typeof from 'babel-runtime/helpers/typeof'; import metadata from '../metadata.min'; import Metadata from '../source/metadata'; describe('metadata', function () { it('should return undefined for non-defined types', function () { var FR = new Metadata(metadata).country('FR'); console.log(FR.type('FIXED_LINE')); type(FR.type('FIXED_LINE')).should.equal('undefined'); }); it('should validate country', function () { var thrower = function thrower() { return new Metadata(metadata).country('RUS'); }; thrower.should.throw('Unknown country'); }); }); function type(something) { return typeof something === 'undefined' ? 'undefined' : _typeof(something); } //# sourceMappingURL=metadata.test.js.map