@@ -34,10 +34,10 @@ describe('serialize and unserialize', () => {
3434 } ) ;
3535} ) ;
3636
37- describe ( 'check string length ' , ( ) => {
37+ describe ( 'checkStringLength ' , ( ) => {
3838 const testVariableType = 'myVar' ;
3939
40- test ( 'checkStringLength used on a non empty string, catches error above the default 32 characters ' , ( ) => {
40+ test ( 'throws an error when the string length exceeds the 32 character default ' , ( ) => {
4141 try {
4242 checkStringLength ( '0123456789012345678901234567890123456789' , testVariableType ) ;
4343 } catch ( error ) {
@@ -50,7 +50,7 @@ describe('check string length', () => {
5050 }
5151 } ) ;
5252
53- test ( 'checkStringLength used on an empty string, catches error due to not meeting custom requirement of 1 - 32 characters ' , ( ) => {
53+ test ( 'throws an error when the string length is lower than the supplied minimum ' , ( ) => {
5454 try {
5555 checkStringLength ( '' , testVariableType , { minLength : 1 , maxLength : 32 } ) ;
5656 } catch ( error ) {
@@ -63,7 +63,7 @@ describe('check string length', () => {
6363 }
6464 } ) ;
6565
66- test ( 'checkStringLength used on a 6 character string, catches error due to not meeting custom requirement of 1 - 5 characters ' , ( ) => {
66+ test ( 'throws an error when the string length is higher than the supplied maximum ' , ( ) => {
6767 try {
6868 checkStringLength ( '0123456' , testVariableType , { minLength : 1 , maxLength : 5 } ) ;
6969 } catch ( error ) {
0 commit comments