File tree Expand file tree Collapse file tree 4 files changed +5
-31
lines changed Expand file tree Collapse file tree 4 files changed +5
-31
lines changed Original file line number Diff line number Diff line change 66
66
uses : codecov/codecov-action@v4
67
67
env :
68
68
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
69
-
70
- test-react-18 :
71
- needs : [install-cache-deps]
72
- runs-on : ubuntu-latest
73
- name : Test React 18
74
- steps :
75
- - name : Checkout
76
- uses : actions/checkout@v4
77
-
78
- - name : Setup Node.js and deps
79
- uses : ./.github/actions/setup-deps
80
-
81
- - name : Switch to React 18
82
- run : |
83
- yarn remove react react-test-renderer react-native @react-native/babel-preset
84
- yarn add -D react@18.3.1 react-test-renderer@18.3.1 react-native@0.77.0 @react-native/babel-preset@0.77.0
85
-
86
- - name : Test
87
- run : yarn test:ci
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ type ReactAct = typeof React.act;
6
6
7
7
// See https://github.com/reactwg/react-18/discussions/102 for more context on global.IS_REACT_ACT_ENVIRONMENT
8
8
declare global {
9
+ // eslint-disable-next-line no-var
9
10
var IS_REACT_ACT_ENVIRONMENT : boolean | undefined ;
10
11
}
11
12
@@ -43,12 +44,12 @@ function withGlobalActEnvironment(actImplementation: ReactAct) {
43
44
// eslint-disable-next-line promise/always-return
44
45
( returnValue ) => {
45
46
setIsReactActEnvironment ( previousActEnvironment ) ;
46
- // @ts -expect-error
47
+ // @ts -expect-error too strict typing
47
48
resolve ( returnValue ) ;
48
49
} ,
49
50
( error ) => {
50
51
setIsReactActEnvironment ( previousActEnvironment ) ;
51
- // @ts -expect-error
52
+ // @ts -expect-error too strict typing
52
53
reject ( error ) ;
53
54
} ,
54
55
) ;
Original file line number Diff line number Diff line change @@ -17,15 +17,6 @@ test('checkHostElement allows host element', () => {
17
17
} ) . not . toThrow ( ) ;
18
18
} ) ;
19
19
20
- test ( 'checkHostElement allows rejects composite element' , ( ) => {
21
- render ( < View testID = "view" /> ) ;
22
-
23
- expect ( ( ) => {
24
- // @ts -expect-error
25
- checkHostElement ( screen . container , fakeMatcher , { } ) ;
26
- } ) . toThrow ( / v a l u e m u s t b e a h o s t e l e m e n t ./ ) ;
27
- } ) ;
28
-
29
20
test ( 'checkHostElement allows rejects null element' , ( ) => {
30
21
expect ( ( ) => {
31
22
// @ts -expect-error: intentionally passing wrong element shape
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ import { getQueriesForElement } from './within';
13
13
export interface RenderOptions {
14
14
/**
15
15
* Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating
16
- * reusable custom render functions for common data providers.
16
+ * reusable custom render functions for common data providers.
17
17
*/
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
19
wrapper ?: React . ComponentType < any > ;
19
20
createNodeMock ?: ( element : React . ReactElement ) => object ;
20
21
}
You can’t perform that action at this time.
0 commit comments