Created
June 6, 2019 17:31
-
-
Save ivanbtrujillo/6145c8c5b17e210854846183c673b3e7 to your computer and use it in GitHub Desktop.
react-testing-library-article-4
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, cleanup, fireEvent } from "@testing-library/react"; | |
import Sum from "./Sum"; | |
describe("Sum", () => { | |
it('should have two inputs to add the numbers', () => { | |
const { getByTestId } = render(<Sum />); | |
const firstInput = getByTestId("value1"); | |
const secondInput = getByTestId("value2"); | |
expect(firstInput).toBeTruthy(); | |
expect(secondInput).toBeTruthy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment