We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1484898 commit 2975530Copy full SHA for 2975530
src/components/Card/_test_/Card.test.tsx
@@ -1,7 +1,7 @@
1
import { Card } from '../';
2
import React from 'react';
3
import { Text } from 'react-native';
4
-import { shallow } from 'enzyme';
+import { shallow, mount } from 'enzyme';
5
6
7
test('Card component component should show children', () => {
@@ -13,3 +13,13 @@ test('Card component component should show children', () => {
13
// expect(component).toMatchSnapshot();
14
expect(component.find('Text')).toBeDefined();
15
});
16
+
17
18
+test('Card component component with onPress Prop', () => {
19
+ const component = mount(
20
+ <Card onPress={() => 'string'}>
21
+ <Text>Card</Text>
22
+ </Card>
23
+ );
24
+ expect(component.props().onPress()).toBe("string");
25
+});
0 commit comments