adds unit tests react-component and react-directive

@davidchang this adds unit tests 
:) good call though on adding unit test coverage!