@@ -3,7 +3,7 @@ import { FieldValidationResult } from '../../entities';
33
44describe ( '[email] validation rule tests =>' , ( ) => {
55 describe ( 'When validating a non string value' , ( ) => {
6- it ( 'should return false if value is null' , ( ) => {
6+ it ( 'should return true if value is null' , ( ) => {
77 // Arrange
88 const value = null ;
99 const vm = undefined ;
@@ -13,12 +13,12 @@ describe('[email] validation rule tests =>', () => {
1313 const validationResult = email ( value , vm , customParams ) as FieldValidationResult ;
1414
1515 // Assert
16- expect ( validationResult . succeeded ) . to . be . false ;
16+ expect ( validationResult . succeeded ) . to . be . true ;
1717 expect ( validationResult . type ) . to . be . equals ( 'EMAIL' ) ;
18- expect ( validationResult . errorMessage ) . to . be . equals ( 'Please enter a valid email address.' ) ;
18+ expect ( validationResult . errorMessage ) . to . be . empty ;
1919 } ) ;
2020
21- it ( 'should return false if value is undefined' , ( ) => {
21+ it ( 'should return true if value is undefined' , ( ) => {
2222 // Arrange
2323 const value = undefined ;
2424 const vm = undefined ;
@@ -28,9 +28,9 @@ describe('[email] validation rule tests =>', () => {
2828 const validationResult = email ( value , vm , customParams ) as FieldValidationResult ;
2929
3030 // Assert
31- expect ( validationResult . succeeded ) . to . be . false ;
31+ expect ( validationResult . succeeded ) . to . be . true ;
3232 expect ( validationResult . type ) . to . be . equals ( 'EMAIL' ) ;
33- expect ( validationResult . errorMessage ) . to . be . equals ( 'Please enter a valid email address.' ) ;
33+ expect ( validationResult . errorMessage ) . to . be . empty ;
3434 } ) ;
3535
3636 it ( 'should return false if value is number' , ( ) => {
0 commit comments