Skip to content

Instantly share code, notes, and snippets.

@freetonik
Created February 3, 2015 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freetonik/4893aef314087c869bfb to your computer and use it in GitHub Desktop.
Save freetonik/4893aef314087c869bfb to your computer and use it in GitHub Desktop.
function checkComponent(actual, expected) {
var actualRendering = React.renderComponentToStaticMarkup(actual._descriptor);
var expectedRendering = React.renderComponentToStaticMarkup(expected);
expect(actualRendering).to.equal(expectedRendering);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment