Skip to content

Commit 40d9a5a

Browse files
committed
Remove tests for removed error checks
1 parent cabcf57 commit 40d9a5a

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

test/components/connect.spec.js

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,55 +2793,6 @@ describe('React', () => {
27932793
})
27942794

27952795
describe('Error handling for removed API options and StrictMode', () => {
2796-
it('should error on withRef=true', () => {
2797-
class Container extends Component {
2798-
render() {
2799-
return <div>hi</div>
2800-
}
2801-
}
2802-
expect(() =>
2803-
connect(undefined, undefined, undefined, { withRef: true })(Container)
2804-
).toThrow(/withRef is removed/)
2805-
})
2806-
2807-
it('should error on receiving a custom store key', () => {
2808-
const connectOptions = { storeKey: 'customStoreKey' }
2809-
2810-
expect(() => {
2811-
@connect(undefined, undefined, undefined, connectOptions)
2812-
class Container extends Component {
2813-
render() {
2814-
return <Passthrough {...this.props} />
2815-
}
2816-
}
2817-
new Container()
2818-
}).toThrow(/storeKey has been removed/)
2819-
})
2820-
2821-
it.skip('should error on custom store', () => {
2822-
function Comp() {
2823-
return <div>hi</div>
2824-
}
2825-
const Container = connect()(Comp)
2826-
function Oops() {
2827-
return <Container store={'oops'} />
2828-
}
2829-
expect(() => {
2830-
rtl.render(<Oops />)
2831-
}).toThrow(/Passing redux store/)
2832-
})
2833-
2834-
it('should error on renderCount prop if specified in connect options', () => {
2835-
function Comp(props) {
2836-
return <div>{props.count}</div>
2837-
}
2838-
expect(() => {
2839-
connect(undefined, undefined, undefined, {
2840-
renderCountProp: 'count',
2841-
})(Comp)
2842-
}).toThrow(/renderCountProp is removed/)
2843-
})
2844-
28452796
it('works in <StrictMode> without warnings (React 16.3+)', () => {
28462797
if (!React.StrictMode) {
28472798
return

0 commit comments

Comments
 (0)