Skip to content

Commit 863eaf4

Browse files
committed
add WindowContent tests
1 parent 1174ebd commit 863eaf4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
3+
import { renderWithTheme } from '../../../test/utils';
4+
5+
import WindowContent from './WindowContent';
6+
7+
describe('<WindowContent />', () => {
8+
it('renders WindowContent', () => {
9+
const { container } = renderWithTheme(<WindowContent />);
10+
const windowContent = container.firstChild;
11+
12+
expect(windowContent).toBeInTheDocument();
13+
});
14+
15+
it('renders children', () => {
16+
const textContent = 'Hi there!';
17+
const { getByText } = renderWithTheme(
18+
<WindowContent>
19+
<span>{textContent}</span>
20+
</WindowContent>
21+
);
22+
expect(getByText(textContent)).toBeInTheDocument();
23+
});
24+
});

0 commit comments

Comments
 (0)