Created
June 30, 2021 12:24
-
-
Save eunsukimme/c122e9ab593d2144e9d49ae77f158740 to your computer and use it in GitHub Desktop.
test code for Counter component with @testing-library/react
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 React from "react"; | |
import { render } from "@testing-library/react"; | |
import Counter from "./Counter"; | |
it("Counter 컴포넌트를 렌더링합니다", () => { | |
const { getByText } = render(<Counter />); | |
getByText("Counter: 0"); | |
getByText("+"); | |
getByText("-"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment