Skip to content

Commit 34b1915

Browse files
committed
fix
1 parent 3db7728 commit 34b1915

File tree

4 files changed

+5
-31
lines changed

4 files changed

+5
-31
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,3 @@ jobs:
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-
85-
86-
- name: Test
87-
run: yarn test:ci

src/act.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
88
declare 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
);

src/matchers/__tests__/utils.test.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff 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(/value must be a host element./);
27-
});
28-
2920
test('checkHostElement allows rejects null element', () => {
3021
expect(() => {
3122
// @ts-expect-error: intentionally passing wrong element shape

src/render.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import { getQueriesForElement } from './within';
1313
export 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
}

0 commit comments

Comments
 (0)