Created
October 11, 2020 21:42
-
-
Save annacoding2020/3cc661966ad5fc64b76b1d766eb70656 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import { render } from "@testing-library/react"; | |
| test("username exists", () => { | |
| const { getByTestId } = render( | |
| <Avatar username="Timonweb" src="https://example.com/avatar.jpg" /> | |
| ); | |
| expect(getByTestId(/username/i).textContent).toBe("Timonweb"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment