Remove deprecated function from tests (#6536)
This has been deprecated since 2013 so it's about time to remove it.
Antti Ahti committed
Oct 24, 2016 at 20:46 UTC
954a70e591233add31d9ac2e29840de08f9bb869
3 files changed
+7
-17
src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponent-test.js
+4
-4
@@ -90,17 +90,17 @@ describe('ReactCompositeComponent', () => {
90
91
reactComponentExpect(instance)
92
.expectRenderedChild()
93
- .toBeDOMComponentWithTag('a');
93
+ .toBeComponentOfType('a');
94
95
instance._toggleActivatedState();
96
reactComponentExpect(instance)
97
.expectRenderedChild()
98
- .toBeDOMComponentWithTag('b');
98
+ .toBeComponentOfType('b');
99
100
instance._toggleActivatedState();
101
reactComponentExpect(instance)
102
.expectRenderedChild()
103
- .toBeDOMComponentWithTag('a');
103
+ .toBeComponentOfType('a');
104
});
105
106
it('should not thrash a server rendered layout with client side one', () => {
@@ -134,7 +134,7 @@ describe('ReactCompositeComponent', () => {
134
ReactTestUtils.Simulate.click(renderedChild);
135
reactComponentExpect(instance)
136
.expectRenderedChild()
137
- .toBeDOMComponentWithTag('b');
137
+ .toBeComponentOfType('b');
138
});
139
140
it('should rewire refs when rendering to different child types', () => {
src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js
+3
-3
@@ -59,7 +59,7 @@ describe('ReactCompositeComponentDOMMinimalism', () => {
59
.expectRenderedChild()
60
.toBeCompositeComponentWithType(LowerLevelComposite)
61
.expectRenderedChild()
62
- .toBeDOMComponentWithTag('div')
62
+ .toBeComponentOfType('div')
63
.toBeDOMComponentWithNoChildren();
64
};
65
});
@@ -97,10 +97,10 @@ describe('ReactCompositeComponentDOMMinimalism', () => {
97
.expectRenderedChild()
98
.toBeCompositeComponentWithType(LowerLevelComposite)
99
.expectRenderedChild()
100
- .toBeDOMComponentWithTag('div')
100
+ .toBeComponentOfType('div')
101
.toBeDOMComponentWithChildCount(1)
102
.expectRenderedChildAt(0)
103
- .toBeDOMComponentWithTag('ul')
103
+ .toBeComponentOfType('ul')
104
.toBeDOMComponentWithNoChildren();
105
});
106
src/test/reactComponentExpect.js
-10
@@ -167,16 +167,6 @@ Object.assign(reactComponentExpectInternal.prototype, {
167
return this;
168
},
169
170
- /**
171
- * @deprecated
172
- * @see toBeComponentOfType
173
- */
174
- toBeDOMComponentWithTag: function(tag) {
175
- this.toBeDOMComponent();
176
- expect(this.instance().tagName).toBe(tag.toUpperCase());
177
- return this;
178
- },
179
-
170
/**
171
* Check that internal state values are equal to a state of expected values.
172
*/