Created
July 31, 2019 19:42
-
-
Save marlosirapuan/8aeb1e2a9a163b952364516518e5df58 to your computer and use it in GitHub Desktop.
Checkbox test
This file contains 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 Checkbox from "./Checkbox" | |
import { render, fireEvent, cleanup } from "react-testing-library" | |
afterEach(cleanup) | |
it("testa check", () => { | |
const { getByTestId } = render(<Checkbox />) | |
fireEvent.click(getByTestId("meucheck")) | |
expect(getByTestId("meucheck").value).toEqual("123"); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment