import { ConcreteComponent , ConcreteDecoratorA , ConcreteDecoratorB , } from '../src/decorator' ; test ( 'decorator.ts -> ConcreteDecoratorA' , ( ) => { const component = new ConcreteComponent ( ) ; const decoratorA = new ConcreteDecoratorA ( component ) ; expect ( decoratorA . operation ( ) ) . toEqual ( 'ConcreteDecoratorA(ConcreteComponent)' ) ; } ) ; test ( 'decorator.ts -> ConcreteDecoratorB' , ( ) => { const component = new ConcreteComponent ( ) ; const decoratorB = new ConcreteDecoratorB ( component ) ; expect ( decoratorB . operation ( ) ) . toEqual ( 'ConcreteDecoratorB(ConcreteComponent)' ) ; } ) ; test ( 'decorator.ts -> ConcreteDecoratorA + ConcreteDecoratorB' , ( ) => { const component = new ConcreteComponent ( ) ; const decoratorA = new ConcreteDecoratorA ( component ) ; const decoratorB = new ConcreteDecoratorB ( decoratorA ) ; expect ( decoratorB . operation ( ) ) . toEqual ( 'ConcreteDecoratorB(ConcreteDecoratorA(ConcreteComponent))' ) ; } ) ;