From d3218561b7863cc7a7905624a7638709eee10292 Mon Sep 17 00:00:00 2001 From: Victor Homyakov Date: Fri, 9 Jan 2015 20:25:47 +0300 Subject: [PATCH] Fix error and warning in test Fix `jsx` extension Fix warning "Something is calling a React component directly" --- templates/spec/App.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/spec/App.js b/templates/spec/App.js index 50cbda1..3009095 100644 --- a/templates/spec/App.js +++ b/templates/spec/App.js @@ -1,6 +1,7 @@ 'use strict'; describe('<%= classedName %>', function () { + var React = require('react/addons'); var <%= scriptAppName %>, component; beforeEach(function () { @@ -8,8 +9,8 @@ describe('<%= classedName %>', function () { container.id = 'content'; document.body.appendChild(container); - <%= scriptAppName %> = require('../../../src/scripts/components/<%= scriptAppName %>.jsx'); - component = <%= scriptAppName %>(); + <%= scriptAppName %> = require('../../../src/scripts/components/<%= scriptAppName %>.js'); + component = React.createElement(<%= scriptAppName %>); }); it('should create a new instance of <%= scriptAppName %>', function () {