Skip to content

Commit 4569f46

Browse files
committed
chore: fix typecheck & lint
1 parent 50ad609 commit 4569f46

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

src/__tests__/fire-event.test.tsx

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,34 @@ const WithoutEventComponent = (_props: WithoutEventComponentProps) => (
3030
</View>
3131
);
3232

33-
type CustomEventComponentProps = {
34-
onCustomEvent: () => void;
35-
};
36-
const CustomEventComponent = ({ onCustomEvent }: CustomEventComponentProps) => (
37-
<TouchableOpacity onPress={onCustomEvent}>
38-
<Text>Custom event component</Text>
39-
</TouchableOpacity>
40-
);
41-
42-
type MyCustomButtonProps = {
43-
handlePress: () => void;
44-
text: string;
45-
};
46-
const MyCustomButton = ({ handlePress, text }: MyCustomButtonProps) => (
47-
<OnPressComponent onPress={handlePress} text={text} />
48-
);
49-
50-
type CustomEventComponentWithCustomNameProps = {
51-
handlePress: () => void;
52-
};
53-
const CustomEventComponentWithCustomName = ({
54-
handlePress,
55-
}: CustomEventComponentWithCustomNameProps) => (
56-
<MyCustomButton handlePress={handlePress} text="Custom component" />
57-
);
33+
// type CustomEventComponentProps = {
34+
// onCustomEvent: () => void;
35+
// };
36+
37+
// const CustomEventComponent = ({ onCustomEvent }: CustomEventComponentProps) => (
38+
// <TouchableOpacity onPress={onCustomEvent}>
39+
// <Text>Custom event component</Text>
40+
// </TouchableOpacity>
41+
// );
42+
43+
// type MyCustomButtonProps = {
44+
// handlePress: () => void;
45+
// text: string;
46+
// };
47+
48+
// const MyCustomButton = ({ handlePress, text }: MyCustomButtonProps) => (
49+
// <OnPressComponent onPress={handlePress} text={text} />
50+
// );
51+
52+
// type CustomEventComponentWithCustomNameProps = {
53+
// handlePress: () => void;
54+
// };
55+
56+
// const CustomEventComponentWithCustomName = ({
57+
// handlePress,
58+
// }: CustomEventComponentWithCustomNameProps) => (
59+
// <MyCustomButton handlePress={handlePress} text="Custom component" />
60+
// );
5861

5962
describe('fireEvent', () => {
6063
test('should invoke specified event', () => {

src/helpers/__tests__/component-tree.test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,4 @@ describe('getUnsafeRootElement()', () => {
247247
const view = screen.getByTestId('view');
248248
expect(getUnsafeRootElement(view)).toEqual(screen.UNSAFE_root);
249249
});
250-
251-
it('returns null for null', () => {
252-
expect(getUnsafeRootElement(null)).toEqual(null);
253-
});
254250
});

0 commit comments

Comments
 (0)