Skip to content

Commit

Permalink
Testing very important for apps...
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumesegarra committed Apr 2, 2019
1 parent 272f1d9 commit d36ccd7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions _templates_/component/%name%.test.js.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import ReactDOM from 'react-dom';

import <%=Name%>Component from './<%=name%>.jsx';

describe('<<%=Name%>Component />', () => {

beforeEach(() => {
container = document.createElement('div');
document.body.appendChild(container);
});

afterEach(() => {
document.body.removeChild(container);
container = null;
});

it('renders without crashing', () => {
ReactDOM.render(<<%=Name%>Component />, container);
});
});

0 comments on commit d36ccd7

Please sign in to comment.