Skip to content

Commit 8c333a0

Browse files
committed
add len1 test case
1 parent 24684c1 commit 8c333a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_validate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ describe('koa-validate' , function(){
169169
this.checkBody('div').isDivisibleBy(3);
170170
this.checkBody('n').isNull();
171171
this.checkBody('len').isLength(3,4);
172+
this.checkBody('len1').isLength(3,4);
172173
this.checkBody('byteLenght').isByteLength(4,6);
173174
this.checkBody('uuid').isUUID();
174175
this.checkBody('time').isTime();
@@ -185,7 +186,8 @@ describe('koa-validate' , function(){
185186
this.checkBody('hw').isHalfWidth();
186187
this.checkBody('vw').isVariableWidth();
187188
this.checkBody('sp').isSurrogatePair();
188-
if(this.errors.length === 48){
189+
console.log(this.errors)
190+
if(this.errors.length === 49){
189191
this.body = this.errors;
190192
this.body = 'ok';
191193
return ;
@@ -200,6 +202,7 @@ describe('koa-validate' , function(){
200202
empty:"fd",
201203
email:"jim@@gmail.com",
202204
len:"l",
205+
len1:"length1",
203206
match:"xyz",
204207
integer:"12a",
205208
float_:'a1.23',

0 commit comments

Comments
 (0)