1 | "use strict";
|
2 |
|
3 | var _parseIncompletePhoneNumber = _interopRequireWildcard(require("./parseIncompletePhoneNumber"));
|
4 |
|
5 | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
|
6 |
|
7 | describe('parseIncompletePhoneNumber', function () {
|
8 | it('should parse phone number character', function () {
|
9 |
|
10 | (0, _parseIncompletePhoneNumber.parsePhoneNumberCharacter)('+').should.equal('+');
|
11 |
|
12 | expect((0, _parseIncompletePhoneNumber.parsePhoneNumberCharacter)('+', '+')).to.be.undefined;
|
13 |
|
14 | (0, _parseIncompletePhoneNumber.parsePhoneNumberCharacter)('1').should.equal('1');
|
15 |
|
16 | (0, _parseIncompletePhoneNumber.parsePhoneNumberCharacter)('٤').should.equal('4');
|
17 |
|
18 | expect((0, _parseIncompletePhoneNumber.parsePhoneNumberCharacter)('-')).to.be.undefined;
|
19 | });
|
20 | it('should parse incomplete phone number', function () {
|
21 | (0, _parseIncompletePhoneNumber["default"])('').should.equal('');
|
22 |
|
23 | (0, _parseIncompletePhoneNumber["default"])('++').should.equal('+');
|
24 |
|
25 | (0, _parseIncompletePhoneNumber["default"])('+7 800 555').should.equal('+7800555');
|
26 |
|
27 | (0, _parseIncompletePhoneNumber["default"])('8 (800) 555').should.equal('8800555');
|
28 |
|
29 | (0, _parseIncompletePhoneNumber["default"])('+٤٤٢٣٢٣٢٣٤').should.equal('+442323234');
|
30 | });
|
31 | });
|
32 |
|
\ | No newline at end of file |