Skip to content

Commit 615bd75

Browse files
committed
tests validator also test for multiple characters
1 parent f57f4c3 commit 615bd75

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/unit/validator/is_test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ function runRanges (ranges, fn, expected) {
88

99
for (var i = lower; i <= upper; i++) {
1010
var unicodeChar = String.fromCodePoint(i);
11-
var nchar = fn(unicodeChar);
12-
nchar.should.eql(expected, i + ' ' + unicodeChar);
11+
// single char
12+
fn(unicodeChar).should.eql(expected, i + ' ' + unicodeChar);
13+
// multiple chars
14+
fn(unicodeChar+unicodeChar).should.eql(expected, i + ' ' + unicodeChar);
1315
}
1416
});
1517
}
@@ -75,7 +77,7 @@ describe('Validator', function () {
7577
runRanges(invalidRanges, is.nqschar, false);
7678
});
7779
it('validates if a value matches a unicode character excluding the carriage return and linefeed characters (uchar)', function () {
78-
this.timeout(10000);
80+
this.timeout(15000);
7981
var validRanges = [
8082
[9, 9], // \u0009
8183
[32, 126], // \u0020-\u007E,

0 commit comments

Comments
 (0)