import { Loggable } from './loggable.decorator' ; describe ( 'Loggable' , ( ) => { describe ( 'isLoggable' , ( ) => { it ( 'should log true by default' , ( ) => { @ Loggable ( ) class ClassMockLoggable { } const classMock = new ClassMockLoggable ( ) ; const result = Loggable . isLoggable ( classMock ) ; expect ( result ) . toBeTruthy ; } ) ; it ( 'should log false if decorator is not instantiate' , ( ) => { class ClassMockNotLoggable { } const classMock = new ClassMockNotLoggable ( ) ; const result = Loggable . isLoggable ( classMock ) ; expect ( result ) . toBeFalsy ; } ) ; } ) ; } ) ;