Created
November 18, 2018 18:35
-
-
Save dennisja/55121251df10f31b2ad123f5e35db900 to your computer and use it in GitHub Desktop.
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
it('should render the loading component', () => { | |
const { getByText } = render( | |
// pass empty array to mocks prop | |
<MockedProvider mocks={[]}> | |
<UsersList /> | |
</MockedProvider> | |
); | |
// find loading component by text | |
const loader = getByText(/Loading/); | |
// check whether that it renders the right content | |
expect(loader.textContent).toBe('Loading....'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment