Created
September 26, 2020 12:39
-
-
Save janhesters/9d3ce02796bab4b398c03bf2a7ec50ad to your computer and use it in GitHub Desktop.
Home page container tests.
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 { fireEvent, render } from '@testing-library/react'; | |
import { describe } from 'riteway'; | |
import HomePage from './home-page-container.js'; | |
describe('HomePage container', async assert => { | |
const { getByText, getByTestId } = render(<HomePage />); | |
fireEvent.click(getByText(/increment/i)); | |
assert({ | |
given: "a click on the 'Increment' button", | |
should: 'increment the count', | |
actual: getByTestId('count').textContent, | |
expected: '1', | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment