license import { defineAction } from "../defineAction" ; import { isType } from "../isType" ; describe ( "isType" , ( ) => { it ( "should return `true` for matching actions" , ( ) => { const RemoveBar = defineAction ( "RemoveBar" ) < number > ( ) ; expect ( isType ( { type : "RemoveBar" , payload : 4 } , RemoveBar . TYPE ) ) . toBe ( true ) ; } ) ; it ( "should return `false` for nonmatching actions" , ( ) => { const RemoveBar = defineAction ( "RemoveBar" ) < number > ( ) ; expect ( isType ( { type : "SetBar" , payload : 4 } , RemoveBar . TYPE ) ) . toBe ( false ) ; } ) ; } ) ;