@@ -62,7 +62,10 @@ describe('validation library', function() {
6262 it ( 'gt' , function ( ) { assert . equal ( false , lib . length ( 'hello' , 4 ) ) ; } ) ;
6363 it ( 'null' , function ( ) { assert . equal ( false , lib . length ( null , 100 ) ) ; } ) ;
6464 it ( 'no length' , function ( ) { assert . equal ( false , lib . length ( { } , 100 ) ) ; } ) ;
65- it ( 'array' , function ( ) { assert . equal ( true , lib . length ( [ 1 , 2 ] , 2 ) ) ; } ) ;
65+ it ( 'arraylt' , function ( ) { assert . equal ( false , lib . length ( [ 1 , 2 ] , 3 ) ) ; } ) ;
66+ it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . length ( [ 1 , 2 ] , 2 ) ) ; } ) ;
67+ it ( 'arraygt' , function ( ) { assert . equal ( false , lib . length ( [ 1 , 2 ] , 1 ) ) ; } ) ;
68+ it ( 'trims' , function ( ) { assert . equal ( true , lib . length ( ' hello ' , 5 ) ) ; } ) ;
6669 } ) ;
6770 describe ( 'lessThan' , function ( ) {
6871 it ( 'lt' , function ( ) { assert . equal ( true , lib . lessThan ( '5' , 6 ) ) ; } ) ;
@@ -92,7 +95,10 @@ describe('validation library', function() {
9295 it ( 'gt' , function ( ) { assert . equal ( false , lib . maxLength ( 'hello' , 4 ) ) ; } ) ;
9396 it ( 'null' , function ( ) { assert . equal ( false , lib . maxLength ( null , 100 ) ) ; } ) ;
9497 it ( 'no length' , function ( ) { assert . equal ( false , lib . maxLength ( { } , 100 ) ) ; } ) ;
95- it ( 'array' , function ( ) { assert . equal ( true , lib . maxLength ( [ 1 , 2 ] , 3 ) ) ; } ) ;
98+ it ( 'arraylt' , function ( ) { assert . equal ( true , lib . maxLength ( [ 1 , 2 ] , 3 ) ) ; } ) ;
99+ it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . maxLength ( [ 1 , 2 ] , 2 ) ) ; } ) ;
100+ it ( 'arraygt' , function ( ) { assert . equal ( false , lib . maxLength ( [ 1 , 2 ] , 1 ) ) ; } ) ;
101+ it ( 'trims' , function ( ) { assert . equal ( true , lib . maxLength ( ' hello ' , 6 ) ) ; } ) ;
96102 } ) ;
97103 describe ( 'min' , function ( ) {
98104 it ( 'lt' , function ( ) { assert . equal ( false , lib . min ( '5' , 6 ) ) ; } ) ;
@@ -111,7 +117,10 @@ describe('validation library', function() {
111117 it ( 'gt' , function ( ) { assert . equal ( true , lib . minLength ( 'hello' , 4 ) ) ; } ) ;
112118 it ( 'null' , function ( ) { assert . equal ( false , lib . minLength ( null , 0 ) ) ; } ) ;
113119 it ( 'no length' , function ( ) { assert . equal ( false , lib . minLength ( { } , 0 ) ) ; } ) ;
114- it ( 'array' , function ( ) { assert . equal ( true , lib . minLength ( [ 1 , 2 ] , 1 ) ) ; } ) ;
120+ it ( 'arraylt' , function ( ) { assert . equal ( false , lib . minLength ( [ 1 , 2 ] , 3 ) ) ; } ) ;
121+ it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . minLength ( [ 1 , 2 ] , 2 ) ) ; } ) ;
122+ it ( 'arraygt' , function ( ) { assert . equal ( true , lib . minLength ( [ 1 , 2 ] , 1 ) ) ; } ) ;
123+ it ( 'trims' , function ( ) { assert . equal ( false , lib . minLength ( ' hello ' , 6 ) ) ; } ) ;
115124 } ) ;
116125 describe ( 'number' , function ( ) {
117126 it ( '01234567899876543210' , function ( ) {
0 commit comments