Skip to content

Commit

Permalink
chore: fixed react test
Browse files Browse the repository at this point in the history
  • Loading branch information
activescott committed Dec 25, 2020
1 parent c8ba584 commit 0521e7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/react-app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react"
import { render } from "@testing-library/react"
import App from "./App"

test("renders learn react link", () => {
test("renders Welcome to our home", () => {
const { getByText } = render(<App />)
const linkElement = getByText(/learn react/i)
expect(linkElement).toBeInTheDocument()
const elem = getByText(/Welcome to our home./i)
expect(elem).toBeInTheDocument()
})
2 changes: 1 addition & 1 deletion src/react-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Terms from "./pages/policy/terms"
// making sure things like the back button and bookmarks
// work properly.

export default function BasicExample() {
export default function App() {
return (
<Router>
<div>
Expand Down
4 changes: 1 addition & 3 deletions src/react-app/src/components/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ const Nav = (): JSX.Element => {
{external ? (
<a href={href}>{label}</a>
) : (
<Link to={href}>
<a href={href} className="nav-link">
<Link to={href} className="nav-link">
{label}
</a>
</Link>
)}
</li>
Expand Down

0 comments on commit 0521e7f

Please sign in to comment.