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 6666 uses : codecov/codecov-action@v4
6767 env :
6868 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;
66
77// See https://github.com/reactwg/react-18/discussions/102 for more context on global.IS_REACT_ACT_ENVIRONMENT
88declare global {
9+ // eslint-disable-next-line no-var
910 var IS_REACT_ACT_ENVIRONMENT : boolean | undefined ;
1011}
1112
@@ -43,12 +44,12 @@ function withGlobalActEnvironment(actImplementation: ReactAct) {
4344 // eslint-disable-next-line promise/always-return
4445 ( returnValue ) => {
4546 setIsReactActEnvironment ( previousActEnvironment ) ;
46- // @ts -expect-error
47+ // @ts -expect-error too strict typing
4748 resolve ( returnValue ) ;
4849 } ,
4950 ( error ) => {
5051 setIsReactActEnvironment ( previousActEnvironment ) ;
51- // @ts -expect-error
52+ // @ts -expect-error too strict typing
5253 reject ( error ) ;
5354 } ,
5455 ) ;
Original file line number Diff line number Diff line change @@ -17,15 +17,6 @@ test('checkHostElement allows host element', () => {
1717 } ) . not . toThrow ( ) ;
1818} ) ;
1919
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-
2920test ( 'checkHostElement allows rejects null element' , ( ) => {
3021 expect ( ( ) => {
3122 // @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';
1313export interface RenderOptions {
1414 /**
1515 * 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.
1717 */
18+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1819 wrapper ?: React . ComponentType < any > ;
1920 createNodeMock ?: ( element : React . ReactElement ) => object ;
2021}
You can’t perform that action at this time.
0 commit comments