Skip to content

Commit 9b6f332

Browse files
jraffcanrozanes
authored andcommitted
test(community-callout-paragraph): fix proptype warnings in test
1 parent 883d9f1 commit 9b6f332

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

packages/CalloutParagraph/__tests__/CalloutParagraph.spec.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { shallow } from 'enzyme'
44
import CalloutParagraph from '../CalloutParagraph'
55

66
describe('CalloutParagraph', () => {
7-
const doShallow = (props = {}) => shallow(<CalloutParagraph {...props} />)
7+
const defaultProps = { children: 'Text' }
8+
9+
const doShallow = props => shallow(<CalloutParagraph {...defaultProps} {...props} />)
810

911
it('renders', () => {
1012
const calloutParagraph = doShallow()

packages/CalloutParagraph/__tests__/__snapshots__/CalloutParagraph.spec.jsx.snap

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ exports[`CalloutParagraph renders 1`] = `
99
bold={false}
1010
invert={false}
1111
size="medium"
12-
/>
12+
>
13+
Text
14+
</Paragraph>
1315
</CalloutParagraph__TextWrapper>
1416
`;
1517

@@ -22,7 +24,9 @@ exports[`CalloutParagraph renders with compact 1`] = `
2224
bold={false}
2325
invert={false}
2426
size="medium"
25-
/>
27+
>
28+
Text
29+
</Paragraph>
2630
</CalloutParagraph__TextWrapper>
2731
`;
2832

@@ -35,7 +39,9 @@ exports[`CalloutParagraph renders with intermediate 1`] = `
3539
bold={false}
3640
invert={false}
3741
size="medium"
38-
/>
42+
>
43+
Text
44+
</Paragraph>
3945
</CalloutParagraph__TextWrapper>
4046
`;
4147

@@ -48,6 +54,8 @@ exports[`CalloutParagraph renders with narrow 1`] = `
4854
bold={false}
4955
invert={false}
5056
size="medium"
51-
/>
57+
>
58+
Text
59+
</Paragraph>
5260
</CalloutParagraph__TextWrapper>
5361
`;

0 commit comments

Comments
 (0)