@@ -74,41 +74,41 @@ class Banana extends React.Component<any, { fresh: boolean }> {
74
74
}
75
75
}
76
76
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;
90
81
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');
94
86
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
+ // });
97
90
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' });
101
94
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');
105
97
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
+ // });
108
101
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
+ // });
112
112
113
113
test ( 'update' , ( ) => {
114
114
const fn = jest . fn ( ) ;
@@ -204,13 +204,13 @@ test('returns host root', () => {
204
204
expect ( screen . root . props . testID ) . toBe ( 'inner' ) ;
205
205
} ) ;
206
206
207
- test ( 'returns composite UNSAFE_root' , ( ) => {
208
- render ( < View testID = "inner" /> ) ;
207
+ // test('returns composite UNSAFE_root', () => {
208
+ // render(<View testID="inner" />);
209
209
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
+ // });
214
214
215
215
test ( 'container displays deprecation' , ( ) => {
216
216
render ( < View testID = "inner" /> ) ;
0 commit comments