import React from 'react' ; import { render } from '@testing-library/react' ; import Contributor from './Contributor' ; describe ( 'Contributor component' , ( ) => { it ( 'should render' , ( ) => { const rendered = render ( < Contributor contributor = { { name : 'octocat' , login : 'octocat' , bio : 'Example bio' , location : 'Warsaw, Poland' , avatar_url : 'https://eu.ui-avatars.com/api/?name=John+Doe' } } />); expect ( rendered . getByAltText ( 'octocat' ) ) . toBeInTheDocument ( ) ; } ) ; } ) ;