Skip to content

Commit 3e9023d

Browse files
jasnoominzo-kim
andcommitted
ErrorMessage & ErrorContainer tests updated
Co-authored-by: minzo-kim <[email protected]>
1 parent b0db7c6 commit 3e9023d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/app/__tests__jn/ErrorContainer.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('unit testing for ErrorContainer.tsx', () => {
3434
test('Reactime website shows as expected', () => {
3535
render(<ErrorContainer />);
3636
expect(
37-
screen.getByText('Please visit the Reactime webiste for more info.'),
37+
screen.getByText('Please visit the Reactime website for more info.'),
3838
).toBeInTheDocument();
3939
});
4040

@@ -67,7 +67,6 @@ describe('unit testing for ErrorContainer.tsx', () => {
6767
test('When currentTitle has a target title', () => {
6868
state.currentTitle = 'Test Page';
6969
render(<ErrorContainer />);
70-
screen.debug();
7170
expect(screen.getByText(`Launching Reactime on tab: Test Page`)).toBeInTheDocument();
7271
expect(screen.queryByText(`Launching Reactime on tab: No Target`)).not.toBeInTheDocument();
7372
});

src/app/__tests__jn/ErrorMsg.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ const props = {
1616
const parseError = jest.fn();
1717

1818
describe('unit testing for ErrorContainer.tsx', () => {
19+
describe('When there are no errors', () => {
20+
test('Returns empty div', () => {
21+
const { container } = render(<ErrorMsg {...props} />);
22+
expect(container.firstChild).toBeNull();
23+
});
24+
});
25+
1926
describe("when there's a RDT Error", () => {
2027
test('RDT error related text shows', () => {
2128
props.status.reactDevToolsInstalled = false;

0 commit comments

Comments
 (0)