UNPKG

755 BJavaScriptView Raw
1"use strict";
2
3var _metadataMin = _interopRequireDefault(require("../metadata.min.json"));
4
5var _getCountryCallingCode = _interopRequireDefault(require("./getCountryCallingCode"));
6
7function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
9describe('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//# sourceMappingURL=getCountryCallingCode.test.js.map
\No newline at end of file