File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11// @flow
22import * as React from 'react' ;
3- import shallow from '../shallow' ;
3+ import { shallowInternal } from '../shallow' ;
44import format from './format' ;
55
66/**
@@ -10,7 +10,7 @@ export default function debugShallow(
1010 instance : ReactTestInstance | React . Element < any > ,
1111 message ?: any
1212) {
13- const { output } = shallow ( instance ) ;
13+ const { output } = shallowInternal ( instance ) ;
1414
1515 if ( message ) {
1616 console . log ( `${ message } \n\n` , format ( output ) ) ;
Original file line number Diff line number Diff line change 11// @flow
22import * as React from 'react' ;
33import ShallowRenderer from 'react-test-renderer/shallow' ; // eslint-disable-line import/no-extraneous-dependencies
4+ import { printDeprecationWarning } from './helpers/errors' ;
45
56/**
67 * Renders test component shallowly using react-test-renderer/shallow
78 */
8- export default function shallow (
9+ export function shallowInternal (
910 instance : ReactTestInstance | React . Element < any >
1011) {
1112 const renderer = new ShallowRenderer ( ) ;
@@ -16,3 +17,11 @@ export default function shallow(
1617 output : renderer . getRenderOutput ( ) ,
1718 } ;
1819}
20+
21+ export default function shallow (
22+ instance : ReactTestInstance | React . Element < any >
23+ ) {
24+ printDeprecationWarning ( 'shallow' ) ;
25+
26+ return shallowInternal ( instance ) ;
27+ }
You can’t perform that action at this time.
0 commit comments