import { ConcreteClass , ConcreteClassWithHook , } from '../src/template-method' ; test . only ( 'template-method.ts -> ConcreteClass' , ( ) => { const concrete = new ConcreteClass ( ) ; const result = concrete . templateMethod ( ) ; expect ( result [ 0 ] ) . toEqual ( '' ) ; expect ( result [ 1 ] ) . toEqual ( 'AbstractClass.baseStep()' ) ; expect ( result [ 2 ] ) . toEqual ( 'ConcreteClass.requiredStep()' ) ; } ) ; test . only ( 'template-method.ts -> ConcreteClassWithHook' , ( ) => { const concrete = new ConcreteClassWithHook ( ) ; const result = concrete . templateMethod ( ) ; expect ( result [ 0 ] ) . toEqual ( 'ConcreteClassWithHook.beforeHook()' ) ; expect ( result [ 1 ] ) . toEqual ( 'AbstractClass.baseStep()' ) ; expect ( result [ 2 ] ) . toEqual ( 'ConcreteClassWithHook.requiredStep()' ) ; } ) ;