-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test to check Welcome component renders a header
Relates #66
- Loading branch information
1 parent
c38c715
commit c099993
Showing
4 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { render, fireEvent, cleanup, waitForElement, queryByTestId} from "@testing-library/react"; | ||
import { toBeInTheDocument } from "@testing-library/jest-dom/"; | ||
import Welcome from './Welcome.js'; | ||
|
||
test('Jest works ok', () => { | ||
expect(true).toBeTruthy(); | ||
}); | ||
|
||
describe('Welcome component renders to page', () => { | ||
test('Welcome component renders header', () => { | ||
const { getByTestId } = render(<Welcome />); | ||
const header = getByTestId("welcome-header"); | ||
expect(header).toBeInTheDocument() | ||
|
||
}); | ||
}); |