diff --git a/src/__tests__/Article.test.js b/src/__tests__/Article.test.js index 51d131e02..ddb3a8dce 100644 --- a/src/__tests__/Article.test.js +++ b/src/__tests__/Article.test.js @@ -1,11 +1,13 @@ -import "@testing-library/jest-dom"; -import { render, screen } from "@testing-library/react"; -import React from "react"; +import "@testing-library/jest-dom" +import {render, screen} from "@testing-library/react" +import React from "react" -import Article from "../components/Article"; +import Article from "../components/Article" test("displays the text 'please pass this test'", () => { - render(
); + render(
) + const element = screen.queryByText("please pass this test") + screen.debug(element) - expect(screen.queryByText("please pass this test")).toBeInTheDocument(); -}); + expect(screen.queryByText("please pass this test")).toBeInTheDocument() +}) diff --git a/src/components/Article.js b/src/components/Article.js index 3afd1670d..2cc60aa98 100644 --- a/src/components/Article.js +++ b/src/components/Article.js @@ -1,11 +1,7 @@ -import React from "react"; +import React from "react" function Article() { - return ( -
- {/* please pass this test */} -
- ); + return
please pass this test
} -export default Article; +export default Article diff --git a/src/components/Header.js b/src/components/Header.js index 2223fb9ca..83447c025 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,12 +1,7 @@ -import React from "react"; +import React from "react" function Header(props) { - return ( -

- {/* uncomment the line below to pass the test */} - {/* hello from the Header! */} -

- ) + return

hello from the Header!

} -export default Header; +export default Header