Last active
August 14, 2022 16:53
-
-
Save trooperandz/45694db8dd929d92b249e0e5546dc1d0 to your computer and use it in GitHub Desktop.
Testing philosophies user test example
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
describe("UserTest", () => { | |
it("Handles the shipment card press event", () => { | |
const { getByTestId } = renderComponent(); | |
fireEvent.press(getByTestId(SHIPMENT_CARD)); | |
expect(mockPressHandler).toHaveBeenCalled(); | |
}); | |
it("Renders the shipment number", async () => { | |
const { getByText } = renderComponent(); | |
expect(getByText(SHIPMENT_NUMBER)).toBeDefined(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment