Skip to content

Commit 43d92f8

Browse files
author
Brian Vaughn
committed
Remove shallow renderer references
1 parent 972461a commit 43d92f8

File tree

9 files changed

+0
-3663
lines changed

9 files changed

+0
-3663
lines changed

packages/react-dom/src/__tests__/ReactTestUtils-test.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
'use strict';
1111

12-
import ReactShallowRenderer from 'react-test-renderer/shallow';
1312
import * as React from 'react';
1413
import * as ReactDOM from 'react-dom';
1514
import * as ReactDOMServer from 'react-dom/server';
@@ -383,27 +382,6 @@ describe('ReactTestUtils', () => {
383382
);
384383
});
385384

386-
it('should throw when attempting to use a React element', () => {
387-
class SomeComponent extends React.Component {
388-
render() {
389-
return <div onClick={this.props.handleClick}>hello, world.</div>;
390-
}
391-
}
392-
393-
const handler = jest.fn().mockName('spy');
394-
const shallowRenderer = ReactShallowRenderer.createRenderer();
395-
const result = shallowRenderer.render(
396-
<SomeComponent handleClick={handler} />,
397-
);
398-
399-
expect(() => ReactTestUtils.Simulate.click(result)).toThrowError(
400-
'TestUtils.Simulate expected a DOM node as the first argument but received ' +
401-
'a React element. Pass the DOM node you wish to simulate the event on instead. ' +
402-
'Note that TestUtils.Simulate will not work if you are using shallow rendering.',
403-
);
404-
expect(handler).not.toHaveBeenCalled();
405-
});
406-
407385
it('should throw when attempting to use a component instance', () => {
408386
class SomeComponent extends React.Component {
409387
render() {

packages/react-test-renderer/npm/shallow.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/react-test-renderer/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@
2121
"dependencies": {
2222
"object-assign": "^4.1.1",
2323
"react-is": "^17.0.0-alpha",
24-
"react-shallow-renderer": "^16.13.1",
2524
"scheduler": "^0.19.0"
2625
},
2726
"peerDependencies": {
2827
"react": "^17.0.0-alpha"
2928
},
30-
"resolutions": {
31-
"react-shallow-renderer/react-is": "^17.0.0-alpha"
32-
},
3329
"files": [
3430
"LICENSE",
3531
"README.md",
3632
"build-info.json",
3733
"index.js",
38-
"shallow.js",
3934
"cjs/",
4035
"umd/"
4136
]

packages/react-test-renderer/shallow.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)