@@ -102,15 +102,10 @@ describe('TextInput tests', () => {
102
102
TextInput . State . focusTextInput ( textInputRef . current ) ;
103
103
expect ( textInputRef . current . isFocused ( ) ) . toBe ( true ) ;
104
104
expect ( TextInput . State . currentlyFocusedInput ( ) ) . toBe ( textInputRef . current ) ;
105
- // This function is currently deprecated and will be removed in the future
106
- expect ( TextInput . State . currentlyFocusedField ( ) ) . toBe (
107
- ReactNative . findNodeHandle ( textInputRef . current ) ,
108
- ) ;
105
+
109
106
TextInput . State . blurTextInput ( textInputRef . current ) ;
110
107
expect ( textInputRef . current . isFocused ( ) ) . toBe ( false ) ;
111
108
expect ( TextInput . State . currentlyFocusedInput ( ) ) . toBe ( null ) ;
112
- // This function is currently deprecated and will be removed in the future
113
- expect ( TextInput . State . currentlyFocusedField ( ) ) . toBe ( null ) ;
114
109
} ) ;
115
110
116
111
it ( 'should unfocus when other TextInput is focused' , ( ) => {
@@ -144,24 +139,17 @@ describe('TextInput tests', () => {
144
139
expect ( textInputRe1 . current . isFocused ( ) ) . toBe ( false ) ;
145
140
expect ( textInputRe2 . current . isFocused ( ) ) . toBe ( false ) ;
146
141
147
- const inputTag1 = ReactNative . findNodeHandle ( textInputRe1 . current ) ;
148
- const inputTag2 = ReactNative . findNodeHandle ( textInputRe2 . current ) ;
149
-
150
142
TextInput . State . focusTextInput ( textInputRe1 . current ) ;
151
143
152
144
expect ( textInputRe1 . current . isFocused ( ) ) . toBe ( true ) ;
153
145
expect ( textInputRe2 . current . isFocused ( ) ) . toBe ( false ) ;
154
146
expect ( TextInput . State . currentlyFocusedInput ( ) ) . toBe ( textInputRe1 . current ) ;
155
- // This function is currently deprecated and will be removed in the future
156
- expect ( TextInput . State . currentlyFocusedField ( ) ) . toBe ( inputTag1 ) ;
157
147
158
148
TextInput . State . focusTextInput ( textInputRe2 . current ) ;
159
149
160
150
expect ( textInputRe1 . current . isFocused ( ) ) . toBe ( false ) ;
161
151
expect ( textInputRe2 . current . isFocused ( ) ) . toBe ( true ) ;
162
152
expect ( TextInput . State . currentlyFocusedInput ( ) ) . toBe ( textInputRe2 . current ) ;
163
- // This function is currently deprecated and will be removed in the future
164
- expect ( TextInput . State . currentlyFocusedField ( ) ) . toBe ( inputTag2 ) ;
165
153
} ) ;
166
154
167
155
it ( 'should render as expected' , ( ) => {
0 commit comments