@@ -16,8 +16,9 @@ const React = require('react');
16
16
17
17
const ReactTestRenderer = require ( 'react-test-renderer' ) ;
18
18
const ShallowRenderer = require ( 'react-test-renderer/shallow' ) ;
19
- /* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
20
- * v0.120 was deployed. To see the error, delete this comment and run Flow. */
19
+ /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error
20
+ * found when Flow v0.122.0 was deployed. To see the error, delete this comment
21
+ * and run Flow. */
21
22
const shallowRenderer = new ShallowRenderer ( ) ;
22
23
23
24
import type { ReactTestRenderer as ReactTestRendererType } from 'react-test-renderer' ;
@@ -27,8 +28,9 @@ export type ReactTestInstance = $PropertyType<ReactTestRendererType, 'root'>;
27
28
export type Predicate = ( node : ReactTestInstance ) => boolean ;
28
29
29
30
type $ReturnType < Fn > = $Call << Ret , A > ( ( ...A ) => Ret ) => Ret , Fn > ;
30
- /* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
31
- * v0.120 was deployed. To see the error, delete this comment and run Flow. */
31
+ /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error
32
+ * found when Flow v0.122.0 was deployed. To see the error, delete this comment
33
+ * and run Flow. */
32
34
export type ReactTestRendererJSON = $ReturnType < ReactTestRenderer . create . toJSON > ;
33
35
34
36
const {
@@ -54,13 +56,13 @@ function byClickable(): Predicate {
54
56
// HACK: Find components that use `Pressability`.
55
57
node . instance ?. state ?. pressability != null ||
56
58
// TODO: Remove this after deleting `Touchable`.
57
- /* $FlowFixMe(>=0.120.0 ) This comment suppresses an error found when Flow
58
- * v0.120 was deployed. To see the error, delete this comment and run
59
- * Flow. */
59
+ /* $FlowFixMe(>=0.122.0 site=react_native_fb ) This comment suppresses an
60
+ * error found when Flow v0.122.0 was deployed. To see the error, delete
61
+ * this comment and run Flow. */
60
62
( node . instance &&
61
- /* $FlowFixMe(>=0.120.0 ) This comment suppresses an error found when
62
- * Flow v0.120 was deployed. To see the error, delete this comment and
63
- * run Flow. */
63
+ /* $FlowFixMe(>=0.122.0 site=react_native_fb ) This comment suppresses
64
+ * an error found when Flow v0.122.0 was deployed. To see the error,
65
+ * delete this comment and run Flow. */
64
66
typeof node . instance . touchableHandlePress === 'function' ) ,
65
67
'is clickable' ,
66
68
) ;
@@ -75,9 +77,9 @@ function byTestID(testID: string): Predicate {
75
77
76
78
function byTextMatching ( regex : RegExp ) : Predicate {
77
79
return withMessage (
78
- /* $FlowFixMe(>=0.120.0 ) This comment suppresses an error found when Flow
79
- * v0.120 was deployed. To see the error, delete this comment and run Flow.
80
- */
80
+ /* $FlowFixMe(>=0.122.0 site=react_native_fb ) This comment suppresses an
81
+ * error found when Flow v0.122.0 was deployed. To see the error, delete
82
+ * this comment and run Flow. * /
81
83
node => node . props && regex . exec ( node . props . children ) ,
82
84
`text content matches ${ regex . toString ( ) } ` ,
83
85
) ;
0 commit comments