Skip to content

Commit 7665cf8

Browse files
committed
remove ts-expect-error
1 parent b401dd2 commit 7665cf8

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

tests/unit/OnyxDerivedTest.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22
import {render} from '@testing-library/react-native';
3+
import {View} from 'react-native';
34
import Onyx from 'react-native-onyx';
45
import type {OnyxCollection} from 'react-native-onyx';
56
import OnyxUtils from 'react-native-onyx/dist/OnyxUtils';
@@ -17,8 +18,11 @@ import createRandomTransaction from '../utils/collections/transaction';
1718
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
1819

1920
const renderLocaleContextProvider = () => {
20-
// @ts-expect-error TS2741: Property 'children' is missing
21-
render(<ComposeProviders components={[OnyxListItemProvider, LocaleContextProvider]} />);
21+
return render(
22+
<ComposeProviders components={[OnyxListItemProvider, LocaleContextProvider]}>
23+
<View>TEST</View>
24+
</ComposeProviders>,
25+
);
2226
};
2327

2428
describe('OnyxDerived', () => {

tests/unit/OptionsListUtilsTest.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22
import {render} from '@testing-library/react-native';
3+
import {View} from 'react-native';
34
import type {OnyxCollection} from 'react-native-onyx';
45
import Onyx from 'react-native-onyx';
56
import ComposeProviders from '@components/ComposeProviders';
@@ -63,8 +64,11 @@ jest.mock('@src/libs/Navigation/Navigation', () => ({
6364
type PersonalDetailsList = Record<string, PersonalDetails & OptionData>;
6465

6566
const renderLocaleContextProvider = () => {
66-
// @ts-expect-error TS2741: Property 'children' is missing
67-
render(<ComposeProviders components={[OnyxListItemProvider, LocaleContextProvider]} />);
67+
return render(
68+
<ComposeProviders components={[OnyxListItemProvider, LocaleContextProvider]}>
69+
<View>TEST</View>
70+
</ComposeProviders>,
71+
);
6872
};
6973

7074
describe('OptionsListUtils', () => {

0 commit comments

Comments
 (0)