Created
April 21, 2014 23:24
-
-
Save awei01/11159942 to your computer and use it in GitHub Desktop.
Code sample of my test that is breaking when I don't think it should.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx React.DOM */ | |
'use strict'; | |
describe('sample test', function() { | |
var Broken, Working; | |
beforeEach(function() { | |
Broken = React.createClass({ | |
render : function() { | |
return ( | |
<div>i am broken</div> | |
); | |
} | |
}); | |
Working = React.createClass({ | |
render : function() { | |
return ( | |
<div></div> | |
); | |
} | |
}); | |
}); | |
it('should render broken into document', function() { | |
var broken = <Broken />; | |
React.addons.TestUtils.renderIntoDocument(broken); | |
}); | |
it('should render working into document', function() { | |
var working = <Working />; | |
React.addons.TestUtils.renderIntoDocument(working); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment