Skip to content

Commit

Permalink
test fix rfc
Browse files Browse the repository at this point in the history
  • Loading branch information
rainer oviir authored and rainer oviir committed Mar 1, 2016
1 parent 754bbf9 commit 1b8b939
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ describe('ReactCompositeComponent', function() {

render: function() {
var output = <Child />;
if (!this.state.flag) {
if (this.state.flag) {
output = <span>Child</span>;
}
return output;
Expand All @@ -832,7 +832,8 @@ describe('ReactCompositeComponent', function() {
});

parentInstance = ReactTestUtils.renderIntoDocument(<Parent />);
expect(childInstance).toBeNull();
expect(childInstance).not.toBeNull();
reactComponentExpect(childInstance).scalarContextEqual({foo: 'bar', depth: 0});

expect(parentInstance.state.flag).toBe(false);
ReactUpdates.batchedUpdates(function() {
Expand All @@ -842,7 +843,7 @@ describe('ReactCompositeComponent', function() {

expect(console.error.argsForCall.length).toBe(0);

reactComponentExpect(childInstance).scalarContextEqual({foo: 'bar', depth: 0});

});

it('unmasked context propagates through updates', function() {
Expand Down

0 comments on commit 1b8b939

Please sign in to comment.