File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,37 @@ test('findByText queries work asynchronously', async () => {
105
105
await expect ( findAllByText ( 'Some Text' ) ) . resolves . toHaveLength ( 1 ) ;
106
106
} , 20000 ) ;
107
107
108
+ test . skip ( 'getByText works properly with custom text component' , ( ) => {
109
+ function BoldText ( { children } ) {
110
+ return < Text > { children } </ Text > ;
111
+ }
112
+
113
+ expect (
114
+ render (
115
+ < Text >
116
+ < BoldText > Hello</ BoldText >
117
+ </ Text >
118
+ ) . getByText ( 'Hello' )
119
+ ) . toBeTruthy ( ) ;
120
+ } ) ;
121
+
122
+ test . skip ( 'getByText works properly with custom text container' , ( ) => {
123
+ function MyText ( { children } ) {
124
+ return < Text > { children } </ Text > ;
125
+ }
126
+ function BoldText ( { children } ) {
127
+ return < Text > { children } </ Text > ;
128
+ }
129
+
130
+ expect (
131
+ render (
132
+ < MyText >
133
+ < BoldText > Hello</ BoldText >
134
+ </ MyText >
135
+ ) . getByText ( 'Hello' )
136
+ ) . toBeTruthy ( ) ;
137
+ } ) ;
138
+
108
139
test ( 'queryByText nested <Image> in <Text> at start' , ( ) => {
109
140
expect (
110
141
render (
You can’t perform that action at this time.
0 commit comments