Skip to content

Commit 7dc8a3a

Browse files
committed
Updated snapshots
1 parent 37cd487 commit 7dc8a3a

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

packages/react-core/src/components/Card/__tests__/CardSubtitle.test.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ test('extra props are spread to the root element', () => {
3737
expect(screen.getByTestId(testId)).toBeInTheDocument();
3838
});
3939

40-
test('Matches snapshot', () => {
41-
const { asFragment } = render(<CardSubtitle>text</CardSubtitle>);
40+
test('Matches snapshot without children', () => {
41+
const { asFragment } = render(<CardSubtitle />);
42+
expect(asFragment()).toMatchSnapshot();
43+
});
44+
45+
test('Matches snapshot with children', () => {
46+
const { asFragment } = render(<CardSubtitle>Subtitle content</CardSubtitle>);
4247
expect(asFragment()).toMatchSnapshot();
4348
});
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Matches snapshot 1`] = `
3+
exports[`Matches snapshot with children 1`] = `
44
<DocumentFragment>
55
<div
66
class=""
77
id=""
88
>
9-
text
9+
Subtitle content
1010
</div>
1111
</DocumentFragment>
1212
`;
13+
14+
exports[`Matches snapshot without children 1`] = `
15+
<DocumentFragment>
16+
<div
17+
class=""
18+
id=""
19+
/>
20+
</DocumentFragment>
21+
`;

0 commit comments

Comments
 (0)