Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/__tests__/Article.test.js
Original file line number Diff line number Diff line change
@@ -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(<Article />);
render(<Article />)
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()
})
10 changes: 3 additions & 7 deletions src/components/Article.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from "react";
import React from "react"

function Article() {
return (
<div>
{/* please pass this test */}
</div>
);
return <div>please pass this test</div>
}

export default Article;
export default Article
11 changes: 3 additions & 8 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import React from "react";
import React from "react"

function Header(props) {
return (
<h1>
{/* uncomment the line below to pass the test */}
{/* hello from the Header! */}
</h1>
)
return <h1>hello from the Header!</h1>
}

export default Header;
export default Header