import { Description } from './description.decorator' ; describe ( 'Description exception decorator' , ( ) => { describe ( 'getDescription' , ( ) => { it ( "should output 'N/A' if decorator is not instantiated" , ( ) => { class ClassMockNotDescription { } const classMock = new ClassMockNotDescription ( ) ; const result = Description . getDescription ( classMock ) ; expect ( result ) . toStrictEqual ( 'N/A' ) ; } ) ; it ( 'should output message defined in parameters if decorator is instantiated' , ( ) => { @ Description ( 'Lorem ipsum dolor sit amet' ) class ClassMockDescription { } const classMock = new ClassMockDescription ( ) ; const result = Description . getDescription ( classMock ) ; expect ( result ) . toStrictEqual ( 'Lorem ipsum dolor sit amet' ) ; } ) ; } ) ; } ) ;