@@ -11,7 +11,7 @@ describe('validation library', function() {
1111 it ( 'normal case' , function ( ) { assert . equal ( true , lib . email ( 'a@b.c' ) ) ; } ) ;
1212 it ( 'requires @' , function ( ) { assert . equal ( false , lib . email ( 'ab.c' ) ) ; } ) ;
1313 it ( 'requires .' , function ( ) { assert . equal ( false , lib . email ( 'a@bc' ) ) ; } ) ;
14- it ( 'trims ' , function ( ) { assert . equal ( true , lib . email ( ' a@b.c ' ) ) ; } ) ;
14+ it ( 'does not trim ' , function ( ) { assert . equal ( false , lib . email ( ' a@b.c ' ) ) ; } ) ;
1515 it ( 'spaces' , function ( ) { assert . equal ( false , lib . email ( 'a @b.c' ) ) ; } ) ;
1616 it ( 'multiple dots' , function ( ) { assert . equal ( true , lib . email ( 'a@b..c' ) ) ; } ) ;
1717 it ( 'multiple @s' , function ( ) { assert . equal ( true , lib . email ( 'a@b@c.d' ) ) ; } ) ;
@@ -49,7 +49,7 @@ describe('validation library', function() {
4949 it ( '+4' , function ( ) { assert . equal ( false , lib . integer ( '+4' ) ) ; } ) ;
5050 it ( '--4' , function ( ) { assert . equal ( false , lib . integer ( '--4' ) ) ; } ) ;
5151 it ( '1.3' , function ( ) { assert . equal ( false , lib . integer ( '1.3' ) ) ; } ) ;
52- it ( ' 4 ' , function ( ) { assert . equal ( true , lib . integer ( ' 4 ' ) ) ; } ) ;
52+ it ( ' 4 ' , function ( ) { assert . equal ( false , lib . integer ( ' 4 ' ) ) ; } ) ;
5353 it ( ' 4 6 ' , function ( ) { assert . equal ( false , lib . integer ( ' 4 6 ' ) ) ; } ) ;
5454 it ( 'null' , function ( ) { assert . equal ( false , lib . integer ( null ) ) ; } ) ;
5555 it ( 'boolean' , function ( ) { assert . equal ( false , lib . integer ( true ) ) ; } ) ;
@@ -65,7 +65,7 @@ describe('validation library', function() {
6565 it ( 'arraylt' , function ( ) { assert . equal ( false , lib . length ( [ 1 , 2 ] , 3 ) ) ; } ) ;
6666 it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . length ( [ 1 , 2 ] , 2 ) ) ; } ) ;
6767 it ( 'arraygt' , function ( ) { assert . equal ( false , lib . length ( [ 1 , 2 ] , 1 ) ) ; } ) ;
68- it ( 'trims ' , function ( ) { assert . equal ( true , lib . length ( ' hello ' , 5 ) ) ; } ) ;
68+ it ( 'does not trim ' , function ( ) { assert . equal ( false , lib . length ( ' hello ' , 5 ) ) ; } ) ;
6969 } ) ;
7070 describe ( 'lessThan' , function ( ) {
7171 it ( 'lt' , function ( ) { assert . equal ( true , lib . lessThan ( '5' , 6 ) ) ; } ) ;
@@ -98,7 +98,7 @@ describe('validation library', function() {
9898 it ( 'arraylt' , function ( ) { assert . equal ( true , lib . maxLength ( [ 1 , 2 ] , 3 ) ) ; } ) ;
9999 it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . maxLength ( [ 1 , 2 ] , 2 ) ) ; } ) ;
100100 it ( 'arraygt' , function ( ) { assert . equal ( false , lib . maxLength ( [ 1 , 2 ] , 1 ) ) ; } ) ;
101- it ( 'trims ' , function ( ) { assert . equal ( true , lib . maxLength ( ' hello ' , 6 ) ) ; } ) ;
101+ it ( 'does not trim ' , function ( ) { assert . equal ( false , lib . maxLength ( ' hello ' , 6 ) ) ; } ) ;
102102 } ) ;
103103 describe ( 'min' , function ( ) {
104104 it ( 'lt' , function ( ) { assert . equal ( false , lib . min ( '5' , 6 ) ) ; } ) ;
@@ -120,7 +120,7 @@ describe('validation library', function() {
120120 it ( 'arraylt' , function ( ) { assert . equal ( false , lib . minLength ( [ 1 , 2 ] , 3 ) ) ; } ) ;
121121 it ( 'arrayeq' , function ( ) { assert . equal ( true , lib . minLength ( [ 1 , 2 ] , 2 ) ) ; } ) ;
122122 it ( 'arraygt' , function ( ) { assert . equal ( true , lib . minLength ( [ 1 , 2 ] , 1 ) ) ; } ) ;
123- it ( 'trims ' , function ( ) { assert . equal ( false , lib . minLength ( ' hello ' , 6 ) ) ; } ) ;
123+ it ( 'does not trim ' , function ( ) { assert . equal ( true , lib . minLength ( ' hello ' , 6 ) ) ; } ) ;
124124 } ) ;
125125 describe ( 'number' , function ( ) {
126126 it ( '01234567899876543210' , function ( ) {
@@ -145,7 +145,7 @@ describe('validation library', function() {
145145 it ( '+4' , function ( ) { assert . equal ( false , lib . numeric ( '+4' ) ) ; } ) ;
146146 it ( '--4' , function ( ) { assert . equal ( false , lib . numeric ( '--4' ) ) ; } ) ;
147147 it ( '1.3' , function ( ) { assert . equal ( false , lib . numeric ( '1.3' ) ) ; } ) ;
148- it ( ' 4 ' , function ( ) { assert . equal ( true , lib . numeric ( ' 4 ' ) ) ; } ) ;
148+ it ( ' 4 ' , function ( ) { assert . equal ( false , lib . numeric ( ' 4 ' ) ) ; } ) ;
149149 it ( ' 4 6 ' , function ( ) { assert . equal ( false , lib . numeric ( ' 4 6 ' ) ) ; } ) ;
150150 it ( 'null' , function ( ) { assert . equal ( false , lib . numeric ( null ) ) ; } ) ;
151151 it ( 'boolean' , function ( ) { assert . equal ( false , lib . numeric ( true ) ) ; } ) ;
@@ -167,9 +167,9 @@ describe('validation library', function() {
167167 it ( 'null' , function ( ) { assert . equal ( false , lib . startsWith ( null ) ) ; } ) ;
168168 it ( 'null searchString' , function ( ) { assert . equal ( false , lib . startsWith ( 'kilgore trout' , null ) ) ; } ) ;
169169 it ( 'non-string searchString' , function ( ) { assert . equal ( false , lib . startsWith ( 'kilgore trout' , 3 ) ) ; } ) ;
170- it ( 'trims value ' , function ( ) { assert . equal ( true , lib . startsWith ( ' kilgore trout' , 'kilg' ) ) ; } ) ;
170+ it ( 'does not trim ' , function ( ) { assert . equal ( false , lib . startsWith ( ' kilgore trout' , 'kilg' ) ) ; } ) ;
171171 it ( 'does not trim searchString' , function ( ) { assert . equal ( false , lib . startsWith ( 'kilgore trout' , ' kilg' ) ) ; } ) ;
172- it ( 'does not trim searchString2' , function ( ) { assert . equal ( false , lib . startsWith ( ' kilgore trout' , ' kilg' ) ) ; } ) ;
172+ it ( 'does not trim searchString2' , function ( ) { assert . equal ( true , lib . startsWith ( ' kilgore trout' , ' kilg' ) ) ; } ) ;
173173 it ( 'empty string' , function ( ) { assert . equal ( false , lib . startsWith ( '' , 'kilgore ' ) ) ; } ) ;
174174 } ) ;
175175 describe ( 'url' , function ( ) {
0 commit comments