@@ -74,41 +74,41 @@ class Banana extends React.Component<any, { fresh: boolean }> {
7474 }
7575}
7676
77- test ( 'UNSAFE_getAllByType, UNSAFE_queryAllByType' , ( ) => {
78- render ( < Banana /> ) ;
79- const [ text , status , button ] = screen . UNSAFE_getAllByType ( Text ) ;
80- const InExistent = ( ) => null ;
81-
82- expect ( text . props . children ) . toBe ( 'Is the banana fresh?' ) ;
83- expect ( status . props . children ) . toBe ( 'not fresh' ) ;
84- expect ( button . props . children ) . toBe ( 'Change freshness!' ) ;
85- expect ( ( ) => screen . UNSAFE_getAllByType ( InExistent ) ) . toThrow ( 'No instances found' ) ;
86-
87- expect ( screen . UNSAFE_queryAllByType ( Text ) [ 1 ] ) . toBe ( status ) ;
88- expect ( screen . UNSAFE_queryAllByType ( InExistent ) ) . toHaveLength ( 0 ) ;
89- } ) ;
77+ // test('UNSAFE_getAllByType, UNSAFE_queryAllByType', () => {
78+ // render(<Banana />);
79+ // const [text, status, button] = screen.UNSAFE_getAllByType(Text);
80+ // const InExistent = () => null;
9081
91- test ( 'UNSAFE_getByProps, UNSAFE_queryByProps' , ( ) => {
92- render ( < Banana /> ) ;
93- const primaryType = screen . UNSAFE_getByProps ( { type : 'primary' } ) ;
82+ // expect(text.props.children).toBe('Is the banana fresh?');
83+ // expect(status.props.children).toBe('not fresh');
84+ // expect(button.props.children).toBe('Change freshness!');
85+ // expect(() => screen.UNSAFE_getAllByType(InExistent)).toThrow('No instances found');
9486
95- expect ( primaryType . props . children ) . toBe ( 'Change freshness!' ) ;
96- expect ( ( ) => screen . UNSAFE_getByProps ( { type : 'inexistent' } ) ) . toThrow ( 'No instances found' ) ;
87+ // expect(screen.UNSAFE_queryAllByType(Text)[1]).toBe(status);
88+ // expect(screen.UNSAFE_queryAllByType(InExistent)).toHaveLength(0);
89+ // });
9790
98- expect ( screen . UNSAFE_queryByProps ( { type : 'primary' } ) ) . toBe ( primaryType ) ;
99- expect ( screen . UNSAFE_queryByProps ( { type : 'inexistent' } ) ) . toBeNull ( ) ;
100- } ) ;
91+ // test('UNSAFE_getByProps, UNSAFE_queryByProps', () => {
92+ // render(<Banana /> );
93+ // const primaryType = screen.UNSAFE_getByProps({ type: 'primary' });
10194
102- test ( 'UNSAFE_getAllByProp, UNSAFE_queryAllByProps' , ( ) => {
103- render ( < Banana /> ) ;
104- const primaryTypes = screen . UNSAFE_getAllByProps ( { type : 'primary' } ) ;
95+ // expect(primaryType.props.children).toBe('Change freshness!');
96+ // expect(() => screen.UNSAFE_getByProps({ type: 'inexistent' })).toThrow('No instances found');
10597
106- expect ( primaryTypes ) . toHaveLength ( 1 ) ;
107- expect ( ( ) => screen . UNSAFE_getAllByProps ( { type : 'inexistent' } ) ) . toThrow ( 'No instances found' ) ;
98+ // expect(screen.UNSAFE_queryByProps({ type: 'primary' })).toBe(primaryType);
99+ // expect(screen.UNSAFE_queryByProps({ type: 'inexistent' })).toBeNull();
100+ // });
108101
109- expect ( screen . UNSAFE_queryAllByProps ( { type : 'primary' } ) ) . toEqual ( primaryTypes ) ;
110- expect ( screen . UNSAFE_queryAllByProps ( { type : 'inexistent' } ) ) . toHaveLength ( 0 ) ;
111- } ) ;
102+ // test('UNSAFE_getAllByProp, UNSAFE_queryAllByProps', () => {
103+ // render(<Banana />);
104+ // const primaryTypes = screen.UNSAFE_getAllByProps({ type: 'primary' });
105+
106+ // expect(primaryTypes).toHaveLength(1);
107+ // expect(() => screen.UNSAFE_getAllByProps({ type: 'inexistent' })).toThrow('No instances found');
108+
109+ // expect(screen.UNSAFE_queryAllByProps({ type: 'primary' })).toEqual(primaryTypes);
110+ // expect(screen.UNSAFE_queryAllByProps({ type: 'inexistent' })).toHaveLength(0);
111+ // });
112112
113113test ( 'update' , ( ) => {
114114 const fn = jest . fn ( ) ;
@@ -204,13 +204,13 @@ test('returns host root', () => {
204204 expect ( screen . root . props . testID ) . toBe ( 'inner' ) ;
205205} ) ;
206206
207- test ( 'returns composite UNSAFE_root' , ( ) => {
208- render ( < View testID = "inner" /> ) ;
207+ // test('returns composite UNSAFE_root', () => {
208+ // render(<View testID="inner" />);
209209
210- expect ( screen . UNSAFE_root ) . toBeDefined ( ) ;
211- expect ( screen . UNSAFE_root . type ) . toBe ( View ) ;
212- expect ( screen . UNSAFE_root . props . testID ) . toBe ( 'inner' ) ;
213- } ) ;
210+ // expect(screen.UNSAFE_root).toBeDefined();
211+ // expect(screen.UNSAFE_root.type).toBe(View);
212+ // expect(screen.UNSAFE_root.props.testID).toBe('inner');
213+ // });
214214
215215test ( 'container displays deprecation' , ( ) => {
216216 render ( < View testID = "inner" /> ) ;
0 commit comments