I cannot write a test and include a rendering of a component with my react/jasmine/phantomjs test.
I try the following:
beforeEach(function(){
var component = TestUtils.renderIntoDocument(
<JsonTab results = [1,2,3]/>
);
and I get the error: Unexpected token <
I am using JSX-loader with webpack so I am not sure why this component cannot be compiled. Any ideas? I am new to react testing.
Aucun commentaire:
Enregistrer un commentaire