import { ActionType } from './ActionType' ; import { InferableAction } from './InferableAction' ; describe ( 'InferableAction' , ( ) : void => { it ( 'instantiate InferableAction' , ( ) : void => { const action = new InferableAction ( 'any_action' , null ) ; expect ( action . type ) . toEqual ( 'any_action' ) ; expect ( action . payload ) . toEqual ( null ) ; } ) ; test ( 'is() type guard' , ( ) : void => { const action = new InferableAction ( ActionType . APP__INITIALIZE , null ) ; expect ( action . is ( ActionType . APP__INITIALIZE ) ) . toEqual ( true ) ; expect ( action . is ( ActionType . APP__INITIALIZING ) ) . toEqual ( false ) ; } ) ; } ) ;