Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ describe('ReactCompositeComponent', function() {

reactComponentExpect(instance)
.expectRenderedChild()
.toBeDOMComponentWithTag('a');
.toBeComponentOfType('a');

instance._toggleActivatedState();
reactComponentExpect(instance)
.expectRenderedChild()
.toBeDOMComponentWithTag('b');
.toBeComponentOfType('b');

instance._toggleActivatedState();
reactComponentExpect(instance)
.expectRenderedChild()
.toBeDOMComponentWithTag('a');
.toBeComponentOfType('a');
});

it('should not thrash a server rendered layout with client side one', () => {
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('ReactCompositeComponent', function() {
ReactTestUtils.Simulate.click(renderedChild);
reactComponentExpect(instance)
.expectRenderedChild()
.toBeDOMComponentWithTag('b');
.toBeComponentOfType('b');
});

it('should rewire refs when rendering to different child types', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('ReactCompositeComponentDOMMinimalism', function() {
.expectRenderedChild()
.toBeCompositeComponentWithType(LowerLevelComposite)
.expectRenderedChild()
.toBeDOMComponentWithTag('div')
.toBeComponentOfType('div')
.toBeDOMComponentWithNoChildren();
};
});
Expand Down Expand Up @@ -97,10 +97,10 @@ describe('ReactCompositeComponentDOMMinimalism', function() {
.expectRenderedChild()
.toBeCompositeComponentWithType(LowerLevelComposite)
.expectRenderedChild()
.toBeDOMComponentWithTag('div')
.toBeComponentOfType('div')
.toBeDOMComponentWithChildCount(1)
.expectRenderedChildAt(0)
.toBeDOMComponentWithTag('ul')
.toBeComponentOfType('ul')
.toBeDOMComponentWithNoChildren();
});

Expand Down
10 changes: 0 additions & 10 deletions src/test/reactComponentExpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,6 @@ Object.assign(reactComponentExpectInternal.prototype, {
return this;
},

/**
* @deprecated
* @see toBeComponentOfType
*/
toBeDOMComponentWithTag: function(tag) {
this.toBeDOMComponent();
expect(this.instance().tagName).toBe(tag.toUpperCase());
return this;
},

/**
* Check that internal state values are equal to a state of expected values.
*/
Expand Down