UNPKG

960 BJavaScriptView Raw
1"use strict";
2
3var _AsYouTypeFormatter = require("./AsYouTypeFormatter.util");
4
5describe('closeNonPairedParens', function () {
6 it('should close non-paired braces', function () {
7 (0, _AsYouTypeFormatter.closeNonPairedParens)('(000) 123-45 (9 )', 15).should.equal('(000) 123-45 (9 )');
8 });
9});
10describe('stripNonPairedParens', function () {
11 it('should strip non-paired braces', function () {
12 (0, _AsYouTypeFormatter.stripNonPairedParens)('(000) 123-45 (9').should.equal('(000) 123-45 9');
13 (0, _AsYouTypeFormatter.stripNonPairedParens)('(000) 123-45 (9)').should.equal('(000) 123-45 (9)');
14 });
15});
16describe('repeat', function () {
17 it('should repeat string N times', function () {
18 (0, _AsYouTypeFormatter.repeat)('a', 0).should.equal('');
19 (0, _AsYouTypeFormatter.repeat)('a', 3).should.equal('aaa');
20 (0, _AsYouTypeFormatter.repeat)('a', 4).should.equal('aaaa');
21 });
22});
23//# sourceMappingURL=AsYouTypeFormatter.util.test.js.map
\No newline at end of file