adds unit tests react-component and react-directive

@davidchang this adds unit tests