Skip to content

Instantly share code, notes, and snippets.

@adamcharnock
Created January 6, 2016 09:17
Show Gist options
  • Save adamcharnock/c3c30090282410a60804 to your computer and use it in GitHub Desktop.
Save adamcharnock/c3c30090282410a60804 to your computer and use it in GitHub Desktop.
import React from 'react';
import Relay from 'react-relay';
export default class ${NAME} extends React.Component {
static propTypes = {};
static defaultProps = {};
render() {
return (
<div />
);
}
}
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react/lib/ReactTestUtils';
import ${NAME} from 'components/${NAME}';
describe('${NAME}', () => {
beforeEach(function() {
});
it('Does something', () => {
let shallowRenderer = TestUtils.createRenderer();
shallowRenderer.render(
<${NAME} />
);
var result = shallowRenderer.getRenderOutput();
expect(result.props.children).to.equal('Some content');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment