1 | "use strict";
|
2 |
|
3 | var _metadataMin = _interopRequireDefault(require("../metadata.min.json"));
|
4 |
|
5 | var _getCountryCallingCode = _interopRequireDefault(require("./getCountryCallingCode"));
|
6 |
|
7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
8 |
|
9 | describe('getCountryCallingCode', function () {
|
10 | it('should get country calling code', function () {
|
11 | (0, _getCountryCallingCode["default"])('US', _metadataMin["default"]).should.equal('1');
|
12 | });
|
13 | it('should throw if country is unknown', function () {
|
14 | expect(function () {
|
15 | return (0, _getCountryCallingCode["default"])('ZZ', _metadataMin["default"]);
|
16 | }).to["throw"]('Unknown country: ZZ');
|
17 | });
|
18 | });
|
19 |
|
\ | No newline at end of file |