Skip to content

Commit 2975530

Browse files
committed
fix(testcases of dialog): dialog component testcases fixed
1 parent 1484898 commit 2975530

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/Card/_test_/Card.test.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Card } from '../';
22
import React from 'react';
33
import { Text } from 'react-native';
4-
import { shallow } from 'enzyme';
4+
import { shallow, mount } from 'enzyme';
55

66

77
test('Card component component should show children', () => {
@@ -13,3 +13,13 @@ test('Card component component should show children', () => {
1313
// expect(component).toMatchSnapshot();
1414
expect(component.find('Text')).toBeDefined();
1515
});
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

Comments
 (0)