import { ValidationException } from './validation.exception' ; describe ( 'ValidationException' , ( ) => { describe ( 'constructor' , ( ) => { it ( 'should should set `errors`property' , ( ) => { const errors = [ ] ; const result = new ValidationException ( errors ) ; expect ( result . errors ) . toBe ( errors ) ; } ) ; } ) ; describe ( 'factory' , ( ) => { it ( 'should return an error instance' , ( ) => { const errors = [ ] ; const result = ValidationException . factory ( errors ) ; expect ( result ) . toBeInstanceOf ( ValidationException ) ; expect ( result . errors ) . toBe ( errors ) ; } ) ; } ) ; } ) ;