Skip to content

Commit a97dbaa

Browse files
authored
Merge pull request #8 from Linhatran/testing
Enzyme Testing
2 parents cb6d385 + c9600ee commit a97dbaa

File tree

9 files changed

+685
-502
lines changed

9 files changed

+685
-502
lines changed

__tests__/HTMLPanel.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Test() {
2222
}
2323

2424

25-
test('Renders HTMLPanel component', () => {
25+
test('Renders HTMLPanel component properly', () => {
2626
render(
2727
<Test/>
2828
);
@@ -37,7 +37,8 @@ test('Renders HTMLPanel component', () => {
3737
expect(screen.getByText('Header 1')).toBeInTheDocument();
3838
expect(screen.getByText('Header 2')).toBeInTheDocument();
3939
expect(screen.getByText('Span')).toBeInTheDocument();
40-
})
40+
expect(screen.queryByText('separator')).toBe(null);
41+
});
4142

4243
test('Adds new custom element', () => {
4344
render(
@@ -54,5 +55,4 @@ test('Adds new custom element', () => {
5455
fireEvent.click(screen.getByDisplayValue('Add Element'));
5556

5657
expect(screen.getByText('Testing')).toBeInTheDocument();
57-
})
58-
58+
});

0 commit comments

Comments
 (0)